Bug 31168 - gcc crashes with: Internal error: Segmentation fault.
gcc crashes with: Internal error: Segmentation fault.
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
: 31016 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2001-03-09 10:54 EST by craigl
Modified: 2007-04-18 12:32 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-04-28 15:21:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
gcc crashed with internal error (686.32 KB, text/plain)
2001-04-27 17:13 EDT, V Lakshman
no flags Details

  None (edit)
Description craigl 2001-03-09 10:54:28 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.14-5.0 i586)

i have been trying to compile the openh323 source code for a few days now. 
eventually, after working through all sorts of memory problems, i have
finally managed to get gcc to crash the way i saw it crash once.

i was just doing a normal compile, and i get the crash output listed in the
'actual results' area.

Reproducible: Always
Steps to Reproduce:
1. get pwlib_min_1.1pl19.tar.gz & openh323_1.1pl1.tar.gz from
2. untar in your home directory ( required for some reason )
then execute the following commands:
3. cd ~/pwlib/
4. make both
5. cd ~/openh323/
6. make opt

i get the crash when it is compiling h245_3.cxx
this is the fourth or fifth file though, and two of the prior ones take a
_very_ long time to compile ( > 9 hours on my p-100 w/ 64MB RAM ).

Actual Results: 
/usr/include/g++-3/iomanip.h: In method `void 
H245_H223AL1MParameters::PrintOn (ostream &) const':
/usr/include/g++-3/iomanip.h:56: Internal error: Segmentation fault.
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
make[1]: *** [/home/craigl/openh323/lib/obj_linux_x86_r/h245_3.o] Error 1
make[1]: Leaving directory `/data/source/craigl/h323/openh323/src'
make: *** [opt] Error 2
Comment 1 craigl 2001-03-09 10:58:45 EST
*** Bug 31016 has been marked as a duplicate of this bug. ***
Comment 2 Jakub Jelinek 2001-03-09 11:13:28 EST
Can you please rerun the g++ command line on h245_3.cxx with the options which
result in the segfault with additional -save-temps -v options and attach here
h245_3.ii it creates (and mention the actual g++ command line used)?
Comment 3 V Lakshman 2001-04-27 17:13:08 EDT
Created attachment 16685 [details]
gcc crashed with internal error
Comment 4 V Lakshman 2001-04-27 17:15:22 EDT

I got a gcc crash when compiling a file (I compiled again with --save-temps and
have attached it to this bug report).

Note: the program compiles fine under the CVS g++-3.0 branch and is okay under
g++-2.95.  So, two possibilities:

 1. A problem in gcc that was fixed between 2.96 and 3.0
 2. A kernel/swap problem in RedHat 7.1

Comment 5 V Lakshman 2001-04-27 18:01:47 EDT

I did some testing. I found that gcc would crash on the same non-comment line of
file __regardless of which line it was___ i.e. I commented out a block of code
just before the point gcc crashed with " #if 0 ... #endif " and sure enough,
gcc crashed immediately after the #endif.

Somehow, gcc can not handle the size of the file maybe? The RedHat 7.1 machine
I am building on has only 64MB memory.

Comment 6 Jakub Jelinek 2001-04-28 15:21:53 EDT
No, the issue is related to old-style ABI mangling of
DimVal < 0 - so, 0 - mo, -1 - to, 0 - co >
(particularly -1 - to).
It does not happen on gcc-3.0 branch because it uses completely different mangling,
and does not happen in 2.95.x because the bug was introduced during development
after 2.95.x was branched off.
I made a patch which seems to work, will include it in gcc-c++-2.96-83.
Comment 7 Need Real Name 2001-07-23 04:34:00 EDT
Hi all,
   I've update the gcc to 2.96.85 following the instruction in redhat support,
   But I still encounter the segmentation fault while compiling mysql, can 
anyone tell me how to fix it? It can be compiled in redhat7.0 without error...
c++ -DMYSQL_SERVER                      -
DDEFAULT_MYSQL_HOME="\"/usr/local/mysql\""                     -
DDATADIR="\"/usr/local/mysql/var\""                   -
DSHAREDIR="\"/usr/local/mysql/share/mysql\""                    -
DHAVE_CONFIG_H -I./../include                  -I./../regex                    -
I. -I../include -I.. -I.    -O3 -DDBUG_OFF   -fno-implicit-templates -c 
sql_parse.cc: In function `void decrease_user_connections (const char 
*, const char *)':

c++: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
make[3]: *** [sql_parse.o] Error 1
make[3]: Leaving directory `/home/linux_package/mysql-3.23.38/sql'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/linux_package/mysql-3.23.38/sql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/linux_package/mysql-3.23.38'

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