Closed
Bug 240710
Opened 22 years ago
Closed 21 years ago
Firefox compiled with GCC 3.4 -fweb optmization crashes on pages with plugins [@ nsPluginHostImpl::SetUpDefaultPluginInstance ]
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
RESOLVED
EXPIRED
People
(Reporter: bjackson0971, Assigned: peterlubczynski-bugs)
Details
(Keywords: crash)
Crash Data
Attachments
(1 file, 2 obsolete files)
|
21.99 KB,
text/plain
|
Details |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040415 Firefox/0.8.0+
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040415 Firefox/0.8.0+
When Firefox is compiled with GCC 3.4's -fweb optmization, the browser crashes
on pages that load plugins such as tomshardware.com or lamlaw.com.
Reproducible: Always
Steps to Reproduce:
1. If you don't have GCC 3.4, download
ftp://gcc.gnu.org/pub/gcc/snapshots/3.4-20040414/gcc-3.4-20040414.tar.bz2
2 ./configure --prefix=/usr/gcc34-20040414 --enable-shared--enable-threads=posix
--enable-__cxa_atexit --enable-long-long--with-system-zlib
--enable-languages=c,c++ && make bootstrap
(Also try make profiledbootstrap for a possible improvement in compile speed)
3. su -c "make install"
4. I usually have to run ldconfig /usr/gcc34-20040414/lib before the firefox
binary will run
5. ~/.mozconfig has:
ac_add_options --enable-optimize="-O2 -s -pipe -march=pentium2 -fforce-addr
-fomit-frame-pointer -momit-leaf-frame-pointer -falign-functions=4 -mmmx
-ftracer -frename-registers -funroll-loops -fpeel-loops -funswitch-loops
-finline-functions -mno-align-stringops -maccumulate-outgoing-args -fweb"
Note that there are no problems until -fweb (also part of -O3) is added.
6. I have a shell script that does:
export PATH=/usr/gcc34-20040414/bin:$PATH and then runs:
make -f client.mk checkout
make -f client.mk build
7. The firefox binary builds and runs, but crashes as soon as you go to a page
with Flash or a Java applet, such as tomshardware.com or lawlaw.com.
Note: I cannot tell if this is a bug in GCC 3.4 caused by generating invalid
code or if it is exposing a bug in the Firefox code that is otherwise unseen.
Actual Results:
Output from firefox --debug
*** global extensions startup!
*** profile extensions startup
[New Thread 1107762096 (LWP 14963)]
[New Thread 1116154800 (LWP 14964)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1085642560 (LWP 14957)]
0x084a5702 in nsPluginHostImpl::SetUpDefaultPluginInstance(char const*, nsIURI*,
nsIPluginInstanceOwner*) ()
(gdb) bt
#0 0x084a5702 in nsPluginHostImpl::SetUpDefaultPluginInstance(char const*, nsIU
RI*, nsIPluginInstanceOwner*) ()
#1 0x084ab497 in nsPluginHostImpl::NewEmbededPluginStream(nsIURI*, nsIPluginIns
tanceOwner*, nsIPluginInstance*) ()
#2 0x087eb963 in nsObjectFrame::InstantiatePlugin(nsIPresContext*, nsHTMLReflow
Metrics&, nsHTMLReflowState const&, nsIPluginHost*, char const*, nsIURI*) ()
#3 0x087ecb33 in nsPluginInstanceOwner::nsPluginInstanceOwner() ()
#4 0x087e6654 in nsLineLayout::ReflowFrame(nsIFrame*, unsigned&, nsHTMLReflowMe
trics*, int&) ()
#5 0x087c2b01 in nsBlockFrame::ReflowInlineFrame(nsBlockReflowState&, nsLineLay
out&, nsLineList_iterator, nsIFrame*, unsigned char*) ()
#6 0x096f03e8 in ?? ()
#7 0xbfffa788 in ?? ()
Expected Results:
Expect pages that load plugins to function normally.
Updated•22 years ago
|
Keywords: crash
Summary: Firefox compiled with GCC 3.4 -fweb optmization crashes on pages with plugins → Firefox compiled with GCC 3.4 -fweb optmization crashes on pages with plugins [@ nsPluginHostImpl::SetUpDefaultPluginInstance ]
Comment 1•22 years ago
|
||
What does -fweb do, exactly? Does it make the ABI incompatible with 3.2, by any
chance?
| Reporter | ||
Comment 2•22 years ago
|
||
(In reply to comment #1)
> What does -fweb do, exactly? Does it make the ABI incompatible with 3.2, by any
> chance?
See the documentation at:
http://gcc.gnu.org/gcc-3.4/changes.html
"A new web construction pass enabled via -fweb (and implied by -O3) improves the
quality of register allocation, CSE, first scheduling pass and some other
optimization passes by avoiding re-use of pseudo registers with non-overlapping
live ranges. The pass almost always improves code quality but does make
debugging difficult and thus is not enabled by default by -O2
"The pass is especially effective as cleanup after code duplication passes, such
as the loop unroller or the tracer."
Comment 3•22 years ago
|
||
Brad, could you possibly compile a build with "-g" (needs about 1.5-2 gigs of
disk space) and see where exactly the crash is happening (that is, which line,
and what the local vars are there)?
(You can also debug without -g, but that requires reasonably good knowledge of
x86 assembly and gcc's C++ calling conventions. The output of the "disasm" and
"inf reg" commands might be useful, but please put it in an attachment rather
than pasting it into the bug.)
| Reporter | ||
Comment 5•22 years ago
|
||
This is the output from bt and bt full running a -g build.
Comment 6•22 years ago
|
||
Interesting. The first two things on the stack there are:
#0 0x084ada72 in nsPluginHostImpl::SetUpDefaultPluginInstance(char const*,
nsIURI*, nsIPluginInstanceOwner*) (this=0x902a760,
aMimeType=0x965a0a8 "\210òØ\b(óØ\bHóØ\b\230óØ\bÀóØ\b\001", aURL=0x93ef718,
aOwner=0x96744e8) at nsCOMPtr.h:704
#1 0x084b3807 in nsPluginHostImpl::InstantiateEmbededPlugin(char const*,
nsIURI*, nsIPluginInstanceOwner*) (this=0x902a760,
aMimeType=0x8fb1f28 "application/x-shockwave-flash", aURL=0x93ef718,
aOwner=0x96744e8) at nsPluginHostImpl.cpp:3382
Now when SetUpDefaultPluginInstance is called by InstantiateEmbededPlugin, it
just passes through aMimeType. So it looks like something has clobbered the
stack there (borne out by the fact that gdb thinks
nsPluginHostImpl::SetUpDefaultPluginInstance is in nsCOMPtr.h)
Then we also have:
result = 0
instance = (class nsIPluginInstance *) 0x0
plugin = {<nsCOMPtr_base> = {mRawPtr = 0x93ec600}, <No data fields>}
I'm curious. Could this be an aliasing problem, given the code we have here?
3886 nsIPluginInstance* instance = NULL;
3905 result = plugin->CreateInstance(NULL, kIPluginInstanceIID, (void
**)&instance);
? (forget the fact that instance is leaked on some error conditions.... <sigh>).
Comment 7•22 years ago
|
||
Does the crash happen with this patch applied?
Comment 8•22 years ago
|
||
And fixed the CallCreateInstance/do_CreateInstace snafu. Try this?
Attachment #146320 -
Attachment is obsolete: true
| Reporter | ||
Comment 9•22 years ago
|
||
The second patch applies cleanly and builds. Firefox now displays the Default
Plugin message box and does not crash.
Comment 10•22 years ago
|
||
Brad, could you test one more thing? Back out that patch, and build with -fweb
but with -fno-strict-aliasing?
Comment 11•22 years ago
|
||
didn't I fix such a thing (accessing a mimetype through a deleted object)
recently (in the patch to make mimeservice use AString/ACString)?
can you also try current cvs w/o bz's patch?
| Reporter | ||
Comment 12•22 years ago
|
||
I did a -g build without the second patch and with -fweb and
-fno-strict-aliasing and it crashes at startup.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1085646656 (LWP 13850)]
0x400f85a6 in NS_InitXPCOM2 (result=0x0, binDirectory=0x0,
appFileLocationProvider=0x8eafdc8) at nsXPComInit.cpp:218
218 rv = registrar->RegisterFactory(info->mCID,
(gdb) bt
#0 0x400f85a6 in NS_InitXPCOM2 (result=0x0, binDirectory=0x0,
appFileLocationProvider=0x8eafdc8) at nsXPComInit.cpp:218
#1 0x08c5e626 in xre_main(int, char**, nsXREAppData const&) (argc=1,
argv=0xbffff484, aAppData=@0xbffff3c0) at nsCOMPtr.h:704
#2 0x082459ef in main (argc=149643408, argv=0x8eb6090) at nsBrowserApp.cpp:51
(gdb) bt full
#0 0x400f85a6 in NS_InitXPCOM2 (result=0x0, binDirectory=0x0,
appFileLocationProvider=0x8eafdc8) at nsXPComInit.cpp:218
i = 1
#1 0x08c5e626 in xre_main(int, char**, nsXREAppData const&) (argc=1,
argv=0xbffff484, aAppData=@0xbffff3c0) at nsCOMPtr.h:704
provider = {<nsCOMPtr_base> = {mRawPtr = 0x8eafdc8}, <No data fields>}
#2 0x082459ef in main (argc=149643408, argv=0x8eb6090) at nsBrowserApp.cpp:51
appData = {mUseSplash = 0 '\0', mUseStartupPrefs = 0 '\0',
mProductName = {<nsCSubstring> = {<nsACString> = {mVTable = 0x40186ae8,
mData = 0x8e8ae00 "Firefox", mLength = 7,
mFlags = 5}, <No data fields>}, <No data fields>}}
Comment 13•22 years ago
|
||
biesi, Brad is already building with your patch (per the email he sent me
yesterday). That's why the first patch I posted did not apply to his tree.
I'm not sure what that XPCOM init part should look like, so ccing bsmedberg, but
the fact that we just crash on startup is very odd to me. Startup is pretty
much known to work... Also, the line numbers in this last stack are not matching
up with the function names (and filenames, for that matter) at all.
bryner, dbaron, any ideas what's up here?
Comment 14•22 years ago
|
||
Comment on attachment 146326 [details] [diff] [review]
Experiment, synced to tip
Well, whatever else we should make this change -- it fixes leaks.
Attachment #146326 -
Flags: superreview?(roc)
Attachment #146326 -
Flags: review?(roc)
Attachment #146326 -
Flags: superreview?(roc)
Attachment #146326 -
Flags: superreview+
Attachment #146326 -
Flags: review?(roc)
Attachment #146326 -
Flags: review+
Comment 15•22 years ago
|
||
Comment on attachment 146326 [details] [diff] [review]
Experiment, synced to tip
Checked in, but leaving open for now in case we actually figure out what's up
here....
Attachment #146326 -
Attachment is obsolete: true
Comment 16•22 years ago
|
||
worksforme with seamonkey trunk compiled with gcc34 with -fweb. I tested
tomshardware.com (flash) and lamlaw.com (java).
I'm using Fedora's devel gcc-3.4.0-1 (based on the gcc 3.4.0 official release)
Comment 17•22 years ago
|
||
(this works for me with gcc 3.4 (prerelease), for all 4 combinations of
-fno-strict-aliasing / default for this option and with/without bz's patch)
Comment 18•21 years ago
|
||
This is an automated message, with ID "auto-resolve01".
This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.
While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.
If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.
The latest beta releases can be obtained from:
Firefox: http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey: http://www.mozilla.org/projects/seamonkey/
Comment 19•21 years ago
|
||
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → EXPIRED
Updated•15 years ago
|
Crash Signature: [@ nsPluginHostImpl::SetUpDefaultPluginInstance ]
Updated•4 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•