Bugzilla – Bug 124230
gcc 4.02 "internal compiler error" during preprocessing of ACE-TAO generated C++ Stub
Last modified: 2007-01-24 14:05:49 UTC
ACE Version 5.47 of August 05 7:37 christoph@linux:~/devel/ACE_wrappers/TAO/tests/MT_BiDir> make -f GNUmakefile.MT_BiDir_Client g++ -fvisibility=hidden -fvisibility-inlines-hidden -W -Wall -Wpointer-arith -O3 -g -pipe -D_REENTRANT -DACE_HAS_AIO_CALLS -D_GNU_SOURCE -I/home/christoph/devel/ACE_wrappers -I/home/christoph/devel/ACE_wrappers/TAO -DACE_HAS_EXCEPTIONS -D__ACE_INLINE__ -I../../.. -I/home/christoph/devel/ACE_wrappers/TAO -c -o .obj/ReceiverC.o ReceiverC.cpp In file included from ReceiverC.cpp:32: ReceiverC.h:47: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.suse.de/feedback> for instructions. make: *** [.obj/ReceiverC.o] Error 1 -> -> Including the preprocessed File doesn't make sense, since -> the preprocessor itself crashes. -> I made a test case -> (only relevant header files included) where gcc -E -> causes a segmentation fault -> see below (mail to christoph.schmalhofer at gmx.net ) -> christoph@linux:/tmp/t> uname -a Linux linux 2.6.13-15-default #1 Tue Sep 13 14:56:15 UTC 2005 i686 i686 i386 GNU/Linux christoph@linux:/tmp/t> gcc -v Using built-in specs. Target: i586-suse-linux Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib --enable-languages=c,c++,objc,f95,java,ada --disable-checking --with-gxx-include-dir=/usr/include/c++/4.0.2 --enable-java-awt=gtk --disable-libjava-multilib --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit --without-system-libunwind --host=i586-suse-linux Thread model: posix gcc version 4.0.2 20050901 (prerelease) (SUSE Linux) christoph@linux:/tmp/t> uname -a Linux linux 2.6.13-15-default #1 Tue Sep 13 14:56:15 UTC 2005 i686 i686 i386 GNU/Linux #!/bin/sh gcc --version gcc -E -I home/christoph/devel/ACE_wrappers/ -I home/christoph/devel/ACE_wrappers/TAO/ home/christoph/devel/ACE_wrappers/TAO/tests/MT_BiDir/ReceiverC.cpp > out christoph@linux:/tmp/header> ./test.sh gcc (GCC) 4.0.2 20050901 (prerelease) (SUSE Linux) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. In file included from <built-in>:0: <built-in>:0: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.suse.de/feedback> for instructions.
Created attachment 53616 [details] testcase for Bug #124230 untar and see header/README
Null pointer passed to memcmp libcpp/files.c line 672 : same_file_p = read_file (pfile, ref_file) /* Size might have changed in read_file(). */ && ref_file->st.st_size == file->st.st_size !sometimes null! && !memcmp (ref_file->buffer, file->buffer, file->st.st_size); This works for me: christoph@linux:/usr/src/packages/BUILD> diff gcc-4.0.2-20050901/libcpp/files.c gcc-4.0.2-20050901/libcpp/files.c.original 672c672 < same_file_p = ref_file->buffer && read_file (pfile, ref_file) --- > same_file_p = read_file (pfile, ref_file)
Fixed meanwhile on gcc 4.1.x .