[Bug libstdc++/31761] New: Build fails with "exception.hpp:84: internal compiler error: Segmentation fault"

rob1weld at aol dot com gcc-bugzilla@gcc.gnu.org
Sun Apr 29 16:32:00 GMT 2007


Make fails near the end of a three stage build with an internal compiler error.

$ gcc/xgcc -v
Using built-in specs.
Target: i686-pc-cygwin
Configured with: ../gcc-4_2-branch/configure --verbose
--enable-languages=c,ada,c++,fortran,java,objc,obj-c++ --with-tune=athlon-xp
--prefix=/usr --enable-objc-gc --enable-concept-checks --disable-multilib
--exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/4.2 --enable-libstdcxx-debug
--enable-static --enable-shared --enable-initfini-array --enable-__cxa_atexit
--enable-threads=posix --enable-version-specific-runtime-libs --enable-libssp
--enable-libmudflap --enable-libgomp --disable-werror --enable-nls
--with-included-gettext --enable-decimal-float --with-long-double-128
--enable-debug --disable-sjlj-exceptions --enable-java-gc=boehm --with-x
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
--enable-java-awt=gtk,xlib --enable-gtk-cairo --enable-qt-peer --enable-xmlj
--enable-gconf-peer --enable-tool-wrappers --enable-portable-native-sync
--enable-libgcj-multifile --with-stabs --enable-hash-synchronization
--enable-gc-debug --enable-interpreter --with-system-zlib --enable-libada
--with-tls --enable-win32-registry --with-cpu=athlon-xp --with-arch=athlon-xp
--enable-checking
Thread model: posix
gcc version 4.2.0 20070427 (prerelease)


I built this SVN version for the i686-pc-linux-gnu platform with almost the
same options and I did NOT get a seg fault. There were a lot of check errors. 

The results for Cygwin's "make -i check" are not available since I cannot
complete the make (yet). The result of the tests for Linux are here:
http://gcc.gnu.org/ml/gcc-testresults/2007-04/msg01490.html . The ./configure
options and some notes about the libstdc++-v3 "make check" results are in the
file.

This is the output from make:

make[3]: Entering directory
`/cygdrive/c/gcc-4_2-branch-build/i686-pc-cygwin/libstdc++-v3'
Making all in include
make[4]: Entering directory
`/cygdrive/c/gcc-4_2-branch-build/i686-pc-cygwin/libstdc++-v3/include'
if [ ! -d ".//bits/extc++.h.gch" ]; then \
          mkdir -p .//bits/extc++.h.gch; \
        fi; \
        /cygdrive/c/gcc-4_2-branch-build/./gcc/xgcc -shared-libgcc
-B/cygdrive/c/gcc-4_2-branch-build/./gcc -nostdinc++
-L/cygdrive/c/gcc-4_2-branch-build/i686-pc-cygwin/libstdc++-v3/src
-L/cygdrive/c/gcc-4_2-branch-build/i686-pc-cygwin/libstdc++-v3/src/.libs
-B/usr//bin/ -B/usr//lib/ -isystem /usr//include -isystem /usr//sys-include
-Winvalid-pch -Wno-deprecated -x c++-header -g -O2 
-I/cygdrive/c/gcc-4_2-branch-build/i686-pc-cygwin/libstdc++-v3/include/
-I/cygdrive/c/gcc-4_2-branch-build/i686-pc-cygwin/libstdc++-v3/include
-I/cygdrive/C/makecygwin/gcc-4_2-branch/libstdc++-v3/libsupc++ -O2 -g
/cygdrive/C/makecygwin/gcc-4_2-branch/libstdc++-v3/include/precompiled/extc++.h
-o bits/extc++.h.gch/O2g.gch
In file included from
/cygdrive/C/makecygwin/gcc-4_2-branch/libstdc++-v3/include/precompiled/extc++.h:60:
/cygdrive/c/gcc-4_2-branch-build/i686-pc-cygwin/libstdc++-v3/include/ext/pb_ds/exception.hpp:
In function 'void pb_ds::__throw_join_error()':
/cygdrive/c/gcc-4_2-branch-build/i686-pc-cygwin/libstdc++-v3/include/ext/pb_ds/exception.hpp:84:
internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[4]: *** [bits/extc++.h.gch/O2g.gch] Error 1
make[4]: Leaving directory
`/cygdrive/c/gcc-4_2-branch-build/i686-pc-cygwin/libstdc++-v3/include'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/cygdrive/c/gcc-4_2-branch-build/i686-pc-cygwin/libstdc++-v3'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/cygdrive/c/gcc-4_2-branch-build/i686-pc-cygwin/libstdc++-v3'
make[1]: *** [all-target-libstdc++-v3] Error 2
make[1]: Leaving directory `/cygdrive/c/gcc-4_2-branch-build'
make: *** [all] Error 2

The file mentioned above is a link to:
gcc-4_2-branch/libstdc++-v3/include/ext/pb_ds/exception.hpp and the line in
question is within an "__EXCEPTION" #ifdef . 


In addition, there is a spelling mistake in that file, look for this sentance:
  // reasons (not, e.g., if memory is unabvailable, in which case


The _actual_ location of the error is not in "exception.hpp" but in the code
that compiles it. The test results for "C" show quite a few more errors than
usual. The "G++" test results (for _Linux_, and NOT _Cygwin_) show only ONE
error).

If I could compile the compiler I could run the tests to try to find where the
error is :) .

If I can not figure out which portion of GCC compiles the file that causes the
seg fault to occur. I will try to cheat and use different ./configure options
to avoid that portion of the code (so I can run "make -i check" and post a
report - that _might_ not help with this bug, since an option will be altered).


-- 
           Summary: Build fails with "exception.hpp:84: internal compiler
                    error: Segmentation fault"
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rob1weld at aol dot com
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31761



More information about the Gcc-bugs mailing list