Bug 97420

Summary: Compiler segfaults on compiling large packages like gcc 3.3 or linux-2.4.21
Product: [Retired] Red Hat Linux Reporter: Ron Sokoloski <rsokoloski1>
Component: gcc3Assignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-03 23:34:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ron Sokoloski 2003-06-15 08:45:42 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030314

Description of problem:
I'm trying to compile gcc 3.3 on my P4. Well, actually I'm trying to get the
2.4.21 kernel to compile on the machine, but that segfaults too. 

The machine does seem a little flaky with the 2.4.20-18.8 kernel and the new
nVidia drivers - that's what I'm trying to fix. The machine was rock-solid on
2.4.18-27.8

Machine config:

ASUS P4PE
Intel 2.53 GHz P4
512Mb PC2700 DDR
Two Adaptec 2940UW SCSI cards
Two 9Gig UW drives
Two 9Gig Ultra drives
on-board Broadcom BCM4441 10/100/1000 ethernet, drivers compiled from source
NVidia T14200 video 128Mb (latest drivers) running TwinView


Version-Release number of selected component (if applicable):
gcc-3.2-7

How reproducible:
Segfaults in different sections of the source 

Steps to Reproduce:
1. Download gcc-3.3 source into /data/gcc
2. Expand the tarball to /data/gcc/gcc-3.3
3. mkdir /data/build, cd /data/build, ../gcc-3.3/configure
4. gmake
    

Actual Results:  typical error when I compile gcc-3.3:

gcc -c   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes      -DHAVE_CONFIG_H    -I. -Iada -I../../gcc-3.3/gcc
-I../../gcc-3.3/gcc/ada -I../../gcc-3.3/gcc/config
-I../../gcc-3.3/gcc/../include ../../gcc-3.3/gcc/ada/adafinal.c -o ada/adafinal.o
gnatbind -C -I- -I. -Iada -I../../gcc-3.3/gcc/ada -o ada/b_gnatb.c ada/gnatbind.ali
gcc -c   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes      -DHAVE_CONFIG_H    -I. -Iada -I../../gcc-3.3/gcc
-I../../gcc-3.3/gcc/ada -I../../gcc-3.3/gcc/config
-I../../gcc-3.3/gcc/../include ada/b_gnatb.c -o ada/b_gnatb.o
gcc: Internal error: Segmentation fault (program as)
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
gmake[1]: *** [ada/b_gnatb.o] Error 1
gmake[1]: Leaving directory `/data/gcc/build/gcc'
gmake: *** [all-gcc] Error 2
[root@localhost build]#

Expected Results:  compiled gcc 3.3

Additional info:

I could up-load the contents of the /data/build directory - there's no core
files in there though.

Comment 1 Jakub Jelinek 2003-06-17 16:00:59 UTC
It is gas that is segfaulting, not gcc.
Have you first upgraded binutils to the one required by gcc?

Comment 2 Ron Sokoloski 2003-06-17 20:10:59 UTC
Upgraded to binutils-2.14 (compiled via source) and tried again. This is the
error now:

<snip>
gcc -c -g -O2      -gnatpg -gnata -I- -I. -Iada -I../../gcc-3.3/gcc/ada
../../gcc-3.3/gcc/ada/sprint.adb -o ada/sprint.o
+===========================GNAT BUG DETECTED==============================+
| 3.2 20020903 (3.2-7) (i386-redhat-linux-gnu) GCC error:                  |
| Internal compiler error in control_flow_insn_p, at cfgbuild.c:134        |
| Error detected at ../../gcc-3.3/gcc/ada/sprint.adb:2546:18               |
| Please submit a bug report, see http://gcc.gnu.org/bugs.html.            |
| Include the entire contents of this bug box in the report.               |
| Include the exact gcc or gnatmake command that you entered.              |
| Also include sources listed below in gnatchop format                     |
| (concatenated together with no headers between files).                   |
+==========================================================================+

Please include these source files with error report

../../gcc-3.3/gcc/ada/sprint.adb
../../gcc-3.3/gcc/ada/sprint.ads
../../gcc-3.3/gcc/ada/types.ads
../../gcc-3.3/gcc/ada/atree.ads
../../gcc-3.3/gcc/ada/alloc.ads
../../gcc-3.3/gcc/ada/sinfo.ads
../../gcc-3.3/gcc/ada/uintp.ads
../../gcc-3.3/gcc/ada/table.ads
../../gcc-3.3/gcc/ada/urealp.ads
../../gcc-3.3/gcc/ada/einfo.ads
../../gcc-3.3/gcc/ada/snames.ads
../../gcc-3.3/gcc/ada/casing.ads
../../gcc-3.3/gcc/ada/csets.ads
../../gcc-3.3/gcc/ada/debug.ads
../../gcc-3.3/gcc/ada/lib.ads
../../gcc-3.3/gcc/ada/namet.ads
../../gcc-3.3/gcc/ada/nlists.ads
../../gcc-3.3/gcc/ada/opt.ads
../../gcc-3.3/gcc/ada/hostparm.ads
../../gcc-3.3/gcc/ada/output.ads
../../gcc-3.3/gcc/ada/rtsfind.ads
../../gcc-3.3/gcc/ada/sinput.ads
../../gcc-3.3/gcc/ada/sinput-d.ads
../../gcc-3.3/gcc/ada/stand.ads
../../gcc-3.3/gcc/ada/stringt.ads
../../gcc-3.3/gcc/ada/uname.ads

compilation abandoned
gmake[1]: *** [ada/sprint.o] Error 1
gmake[1]: Leaving directory `/data/gcc/build/gcc'
gmake: *** [all-gcc] Error 2
[root@localhost build]#

Actually, it seems to be failing in the same place as with binutils-2.13.90.0.2-2. 



Comment 3 Richard Henderson 2004-10-03 23:34:21 UTC
Do note that the nvidia drivers are known to cause kernel corruption
that can cause this kind of failure.  Given that other folk have no
problem compiling gcc or the kernel, I don't believe this to be a gcc
bug at all.