Closed Bug 76604 Opened 25 years ago Closed 24 years ago

mozilla + gcc3 + -O2 == crash on startup

Categories

(SeaMonkey :: Build Config, defect, P1)

x86
Linux
defect

Tracking

(Not tracked)

VERIFIED WORKSFORME
mozilla0.9.2

People

(Reporter: dbaron, Assigned: dbaron)

Details

Attachments

(2 files)

Something changed in the gcc3 branch between 20010309 (I think) and the 20010326 snapshot that causes mozilla to crash on startup when compiled with -O2. I've seen the problem in the weekly snapshots dated 20010326, 20010402, 20010409, and 20010416. It works fine when compiled without optimization, and I haven't tested -O. When I compile optimized non-debug, the crash is in the CheckForBrowser function in layout/html/document/src/nsFrameFrame.cpp (and was there across a number of different gcc versions and mozilla tree pulls). When I compile optimized debug, the crash is here (notice something is messed up with line numbers): #4 <signal handler called> #5 0xfffdd78f in ?? () #6 0x40df369c in imgRequest::OnDataAvailable(imgIRequest*, nsISupports*, gfxIImageFrame*, nsRect const*) (this=0x8404170, request=0x0, cx=0x0, frame=0x848d298, rect=0xbfffea98) at ../../../dist/include/xpcom/nsISupportsUtils.h:1241 #7 0x40e2344a in HaveDecodedRow(void*, unsigned char*, unsigned char*, int, int, int, int, unsigned char, int) (aClientData=0x844f970, aRowBufPtr=0x8474790 "", aRGBrowBufPtr=0x8252e80 "", aXOffset=0, aLength=11, aRowNumber=0, aDuplicateCount=1, aDrawMode=4, aInterlacePass=1) at ../../../../dist/include/xpcom/nsCOMPtr.h:647 I really don't know if this is a Mozilla bug or a gcc bug. It could be that the gcc folks turned on some optimization that breaks some incorrect code in Mozilla, or it could be a gcc bug... Somebody else please take this bug. :-)
The patch I will attach moves the crash to some other function. printfs in other parts of CheckForBrowser don't have the same effect. It prints "(nil)" and "(nil)" for the 2 values.
Problem does not occur with 3-12 snapshot.
I just filed a bug report in GNATS, and I'm currently building the May 21 snapshot. This should have been my top priority a while back... and I'll try to make it that when I have some more time next week. P1/0.9.2
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla0.9.2
It might be interesting to try compiling -O2 -ggdb, and see what sort of backtrace information you get from that.
With a gcc 3.0 cvs pull from last night, gcc3 -O2 builds seem to be working now.
Yeah, I discovered the same thing yesterday, but forgot to comment on the bug.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
verified.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: