Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 103230 - gcc 3.3.5-20050130 segfaults on QT application code when using dependency building
Summary: gcc 3.3.5-20050130 segfaults on QT application code when using dependency bui...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-21 06:04 UTC by Justin Carlson
Modified: 2005-12-12 06:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Preprocessed source file which causes the crash. (foobar.cc,1.46 MB, text/plain)
2005-08-21 06:06 UTC, Justin Carlson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Carlson 2005-08-21 06:04:12 UTC
g++ segfaults when compiling a specific file.  The segfault goes away when the
dependency-generation flags of gcc are turned off.  For the specific
preprocessed code, see the attachment.  Apologies for the length, but if I
remove more headers, the crash goes away.

The crash seems to be very sensitive to context.  If I change much, it goes away.

Reproducible: Always
Steps to Reproduce:
1. g++ -I.  -DQT_THREAD_SUPPORT   -I/usr/qt/3/include -O0 -g -Wall -MT foobar.o
-MD -MP -MF -c -o foobar.o foobar.cc
Actual Results:  
time_widget.cc: In constructor `Session::TimeWidget::TimeWidget(QWidget*, const
   char*)':
time_widget.cc:96: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
Preprocessed source stored into /tmp/cciKFSjF.out file, please attach this to
your bugreport.


Expected Results:  
Compiled the file.
Comment 1 Justin Carlson 2005-08-21 06:06:36 UTC
Created attachment 66471 [details]
Preprocessed source file which causes the crash.
Comment 2 Justin Carlson 2005-08-21 06:08:20 UTC
Output of gcc -v:

g++ -v -I.  -DQT_THREAD_SUPPORT   -I/usr/qt/3/include -O0 -g -Wall -MT foobar.o
-MD -MP -MF -c -o foobar.o foobar.cc
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/specs
Configured with: /var/tmp/portage/gcc-3.3.5.20050130-r1/work/gcc-3.3.5/configure
--enable-version-specific-runtime-libs --prefix=/usr
--bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3.5-20050130
--includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5-20050130
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5-20050130/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5-20050130/info
--with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/include/g++-v3
--host=i686-pc-linux-gnu --disable-altivec --enable-nls
--without-included-gettext --with-system-zlib --disable-checking
--disable-werror --disable-libunwind-exceptions --disable-multilib
--disable-libgcj --enable-languages=c,c++,f77 --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1,
pie-8.7.7.1)
 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/cc1plus -quiet -v -I.
-I/usr/qt/3/include -MD foobar.d -MF -c -MP -MT foobar.o -MQ foobar.o
-D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=5 -D_GNU_SOURCE
-DQT_THREAD_SUPPORT foobar.cc -D__GNUG__=3 -quiet -dumpbase foobar.cc -auxbase
foobar -g -O0 -Wall -version -o /tmp/ccmsW1EW.s
GNU C++ version 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1,
pie-8.7.7.1) (i686-pc-linux-gnu)
        compiled by GNU C version 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1,
ssp-3.3.5.20050130-1, pie-8.7.7.1).
GGC heuristics: --param ggc-min-expand=63 --param ggc-min-heapsize=63325
ignoring nonexistent directory "/usr/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 .
 /usr/qt/3/include
 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/include/g++-v3
 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/include/g++-v3/i686-pc-linux-gnu
 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/include/g++-v3/backward
 /usr/local/include
 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/include
 /usr/include
End of search list.
time_widget.cc: In constructor `Session::TimeWidget::TimeWidget(QWidget*, const
   char*)':
time_widget.cc:96: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
Preprocessed source stored into /tmp/ccocLAOt.out file, please attach this to
your bugreport.
Comment 3 Caleb Tennis (RETIRED) gentoo-dev 2005-09-18 07:31:16 UTC
This seems to indicate you have a local problem with your machine.  Perhaps you're running out of RAM or 
the CPU is overheating.
Comment 4 Justin Carlson 2005-09-18 07:48:19 UTC
>This seems to indicate you have a local problem with your machine.  Perhaps
>you're running out of RAM or 
>the CPU is overheating.

I doubt the cause is hardware for a number of reasons.

It's reproducable on 2 different machines.  There are stock Dell P4
workstations.   One has 512MB of RAM, the other has 1GB.  They aren't
overclocked, and show no general stability problems.  getrusage() polling shows
minimal (<100MB) memory usage throughout the run.

I've not been able to check on a non-P4 machine.  It could be a meta-gcc bug, as
make.conf for these boxen uses -march=pentium4; perhaps gcc itself has been
miscompiled.

Note that the bug is absolutely dependent on all the compiler switches given.
Comment 5 Caleb Tennis (RETIRED) gentoo-dev 2005-09-18 08:33:41 UTC
Very strange indeed!
Comment 6 Mark Loeser (RETIRED) gentoo-dev 2005-12-12 06:58:19 UTC
This should be fine with gcc-3.4.4.