On my mostly redhat 7.0 machine (with bits of rawhide), g++ segfaults when compiling a mozilla cvs tree I pulled down yesterday (2000/12/16) Relevant packages: gcc-c++-2.96-65 (from rawhide) gmake[3]: Entering directory `/home/craig/mozilla/db/mork/src' morkTable.cpp c++ -o morkTable.o -c -DOSTYPE=\"Linux2.4\" -DOJI -I../../../dist/include -I../../../dist/include -I/usr/X11R6/include -fPIC -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth -pedantic -Wno-long-long -pthread -O6 -DNDEBUG -DTRIMMED -DMOZILLA_CLIENT -include ../../../config-defs.h -Wp,-MD,.deps/morkTable.pp morkTable.cpp morkTable.cpp: In method `void morkTable::NoteTableAddRow (morkEnv *, morkRow *)': morkTable.cpp:764: Internal error: Segmentation fault. Please submit a full bug report. See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions. Note that I'm compiling with -O6. I have glibc-2.2-7 installed and am using a 2.4.0test11pre4 kernel. My machine compiled mozilla happily previously using the redhat 7.0 supplied g++ but since then I have upgraded to the rawhide g++ and grabbed a fresh mozilla CVS tree so I can't say for sure that the vanilla g++ would have been happy with things either and I haven't downgraded g++ to check.
Can you please rerun the above command with -save-temps -v options and put morkTable.ii it creates here as an attachement? Thanks.
Created attachment 6517 [details] morkTable.ii as requested
OK. Here is the output. I think I've managed to attached the morkTable.ii file too a moment ago ... thank you! Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 20000731 (Red Hat Linux 7.0) /usr/lib/gcc-lib/i386-redhat-linux/2.96/cpp0 -lang-c++ -D__GNUG__=2 -v -I../../../dist/include -I../../../dist/include -I/usr/X11R6/include -D__GNUC__=2 -D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__OPTIMIZE__ -Wall -Wconversion -Wpointer-arith -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth -Wno-long-long -pedantic -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__tune_i386__ -D__PIC__ -D__pic__ -D_REENTRANT -DOSTYPE="Linux2.4" -DOJI -DNDEBUG -DTRIMMED -DMOZILLA_CLIENT -include ../../../config-defs.h -MD .deps/morkTable.pp morkTable.cpp morkTable.ii GNU CPP version 2.96 20000731 (Red Hat Linux 7.0) (cpplib) (i386 Linux/ELF) ignoring nonexistent directory "/usr/i386-redhat-linux/include" ignoring duplicate directory "../../../dist/include" #include "..." search starts here: #include <...> search starts here: ../../../dist/include /usr/X11R6/include /usr/include/g++-3 /usr/local/include /usr/lib/gcc-lib/i386-redhat-linux/2.96/include /usr/include End of search list. /usr/lib/gcc-lib/i386-redhat-linux/2.96/cc1plus morkTable.ii -quiet -dumpbase morkTable.cpp -O6 -Wall -Wconversion -Wpointer-arith -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth -Wno-long-long -pedantic -version -fPIC -fno-rtti -fno-exceptions -o morkTable.s GNU C++ version 2.96 20000731 (Red Hat Linux 7.0) (i386-redhat-linux) compiled by GNU C version 2.96 20000731 (Red Hat Linux 7.0). morkTable.cpp: In method `void morkTable::NoteTableAddRow (morkEnv *, morkRow *)': morkTable.cpp:764: Internal error: Segmentation fault. Please submit a full bug report. See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
Thanks, apparently my bug introduced fairly recently (someone fixed it already in CVS trunk so I'll just include that fix in gcc-c++-2.96-69. Thanks for the report.
Magic. Thank you. I assume bugzilla will let me know when the bug status changes. A couple of semi-related questions if you don't mind: Your reply seems to indicate that there should be a gcc-c++-2.96-68 somewhere but ftp://rawhide.redhat.com/rawhide/i386/RedHat/RPMS/ only has -65. Am I looking in the right spot or is the internal rawhide tree only synced to the ftp site every so often? Also, Joe Buck's comments on linuxtoday: http://linuxtoday.com/news_story.php3?ltsn=2000-12-14-002-21-NW-RH-SW-0005 suggest that 2.96 does not produce optimal code for some 'inner loops'. Is that fixed in the rawhide package/CVS too? I'm hoping it will speed up mozilla on my machine ;) Thank you!
Yep, rawhide is not cut daily. To answer the other question, yes, 2.96-nn up to 67 had optimization issues Joe Buck is talking about, in 2.96-68 there are three small patches which lower Stepanov abstraction penalty from 3.88 to 1.41 or less.
Thank you for the answers to my other questions. I've just installed all the 2.96-69 which has appeared in updates directory and recompiled the latest mozilla CVS tree. Thank you! I've changed the resolution to 'ERRATA' btw. given that the package is in the 7.0 updates dir. Please change it if I've flagged it incorrectly. Thank you.