Bug 252316 - g++: Internal error: Segmentation fault (program cc1plus)
g++: Internal error: Segmentation fault (program cc1plus)
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
6
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-15 07:22 EDT by Jochen Schlick
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-18 03:47:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jochen Schlick 2007-08-15 07:22:43 EDT
Description of problem:

I tried to compile nullmailer 1.03 from untroubled.org
(http://untroubled.org/nullmailer/) and the compiler crashes.

schlick@rsstest1:~/rpmbuild/nullmailer/nullmailer-1.03 > ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking whether g++ accepts -fno-rtti... no
checking whether g++ accepts -fno-exceptions... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking for strip... /usr/bin/strip
checking for rm... /bin/rm
checking for mkdir... /bin/mkdir
checking for socket in -lxnet... no
checking for socket in -linet... no
checking for socket in -lsocket... no
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for size_t... yes
checking whether struct tm contains tm_isdst... yes
checking whether struct tm contains __tm_isdst... no
checking whether struct tm contains tm_gmtoff... yes
checking whether struct tm contains __tm_gmtoff... no
checking whether struct utsname contains domainname... no
checking whether struct utsname contains __domainname... yes
checking whether named pipes are buggy... no
checking for setenv... yes
checking for srandom... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating lib/Makefile
config.status: creating lib/cli++/Makefile
config.status: creating lib/fdbuf/Makefile
config.status: creating lib/mystring/Makefile
config.status: creating protocols/Makefile
config.status: creating src/Makefile
config.status: creating test/Makefile
config.status: creating config.h
config.status: executing depfiles commands
schlick@rsstest1:~/rpmbuild/nullmailer/nullmailer-1.03 > make
make  all-recursive
make[1]: Entering directory `/home/schlick/rpmbuild/nullmailer/nullmailer-1.03'
Making all in doc
make[2]: Entering directory `/home/schlick/rpmbuild/nullmailer/nullmailer-1.03/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/schlick/rpmbuild/nullmailer/nullmailer-1.03/doc'
Making all in lib
make[2]: Entering directory `/home/schlick/rpmbuild/nullmailer/nullmailer-1.03/lib'
Making all in cli++
make[3]: Entering directory
`/home/schlick/rpmbuild/nullmailer/nullmailer-1.03/lib/cli++'
source='main.cc' object='main.o' libtool=no \
        DEPDIR=.deps depmode=none /bin/sh ../../depcomp \
        g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I..    -W -Wall -c -o main.o main.cc
g++: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
make[3]: *** [main.o] Error 1
make[3]: Leaving directory
`/home/schlick/rpmbuild/nullmailer/nullmailer-1.03/lib/cli++'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/schlick/rpmbuild/nullmailer/nullmailer-1.03/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/schlick/rpmbuild/nullmailer/nullmailer-1.03'
make: *** [all] Error 2

#######################################
- the configure step produces 10 core files, but the gdb output is not very
informative...

schlick@rsstest1:~/rpmbuild/nullmailer/nullmailer-1.03 > gdb
/usr/libexec/gcc/i386-redhat-linux/4.1.2/cc1plus core.cc1plus.19234
GNU gdb Red Hat Linux (6.5-15.fc6rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as
"i386-redhat-linux-gnu"..."/usr/libexec/gcc/i386-redhat-linux/4.1.1/cc1plus":
not in executable format: File format not recognized

Core was generated by `/usr/libexec/gcc/i386-redhat-linux/4.1.2/cc1plus -quiet
-D_GNU_SOURCE conftest.'.
Program terminated with signal 11, Segmentation fault.
#0  0xffffe410 in ?? ()
(gdb) bt
#0  0xffffe410 in ?? ()


- the make step produces no additional core files :-(



Version-Release number of selected component (if applicable):
gcc-4.1.2-13.fc6


Reproducible:
./configure
make
Comment 1 Jochen Schlick 2007-08-15 07:33:15 EDT
- I tried it also on a old obsolete FC2 system with (gcc-3.3.3-7) and it
compiles without errors.
- same for a FC5 system with  gcc-4.1.1-1.fc5
Comment 2 Jakub Jelinek 2007-08-16 03:38:16 EDT
If it is reproduceable, always on the same file same segfault, please
provide preprocessed source.
If g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I..    -W -Wall -c -o main.o main.cc
dies, run
g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I..    -W -Wall -c -o main.o main.cc \
-save-temps

and attach main.ii it creates.
Comment 3 Jochen Schlick 2007-08-17 04:25:53 EDT
- ok, I tried it at home on rawhide and it works.

#########
- on FC6, normal compilation as it is defined in the Makefile creates a corefile
too. here the concerning gdb-outout: 

schlick@rsstest1:~/rpmbuild/nullmailer/nullmailer-1.03/lib/cli++ > gdb
/usr/libexec/gcc/i386-redhat-linux/4.1.2/cc1plus core.cc1plus.14314
GNU gdb Red Hat Linux (6.5-15.fc6rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as
"i386-redhat-linux-gnu"..."/usr/libexec/gcc/i386-redhat-linux/4.1.1/cc1plus":
not in executable format: File format not recognized

Core was generated by `/usr/libexec/gcc/i386-redhat-linux/4.1.2/cc1plus -quiet
-I. -I. -I../.. -I.. -D'.
Program terminated with signal 11, Segmentation fault.
#0  0xffffe410 in ?? ()
(gdb) bt
#0  0xffffe410 in ?? ()

#########
 - manually without Makefile:

schlick@rsstest1:~/rpmbuild/nullmailer/nullmailer-1.03/lib/cli++ > g++
-DHAVE_CONFIG_H -I. -I. -I../.. -I..    -W -Wall -c -o main.o main.cc
g++: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.

- identical gdb output from the corefile.

###############
- now with save-temps, --> no main.ii file :-( 

 schlick@rsstest1:~/rpmbuild/nullmailer/nullmailer-1.03/lib/cli++ > g++
-DHAVE_CONFIG_H -I. -I. -I../.. -I..    -W -Wall -c -o main.o main.cc -save-temps
g++: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.



Comment 4 Jochen Schlick 2007-08-17 04:38:24 EDT
GOTCHA:
I tried to compile several other c++ programs on this host and all result in the
same error. 
This leads me to the idea that something with the yum update must have gone
wrong in June/July. "rpm -V gcc-4.1.2-13.fc6" shows nothing but "rpm -V
gcc-c++-4.1.2-13.fc6" shows the following:
rsstest1:/ # rpm -V gcc-c++-4.1.2-13.fc6
S.5.....   /usr/libexec/gcc/i386-redhat-linux/4.1.1/cc1plus

So I reinstalled gcc-c++ and compiling works again. 

Thanx for your efforts, I think you can close this bug because something had
overwritten the cc1plus executable in my env.

best regards, jochen

Note You need to log in before you can comment on or make changes to this bug.