Bug 197510

Summary: internal compiler error: Segmentation fault (with -O3 -fPIC)
Product: Red Hat Enterprise Linux 4 Reporter: Ben <brouits>
Component: gcc3Assignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-04 10:46:18 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 Ben 2006-07-03 13:12:09 UTC
Description of problem:
GCC 3.4 segfaults randomly on compiling a large tree of C files.

Version-Release number of selected component (if applicable):
version gcc 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)

How reproducible:
fuzzy. (tried about 8 times)
fails 90% on random files while building the whole tree with 'make'.
fails 0% when compiling single files step by step, by hand.

Steps to Reproduce:
1. gcc -m32 -c -g -O3  -ansi -pedantic -Wall -Wpointer-arith -Wundef -I../inc
-fPIC foobar.c
  
Actual results:
foobar.c:100: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.

Expected results:
no output, foobar.c compiled into foobar.o

Additional info:
The line number showed by the error message seems to be always an end of
function block. Compiling still fails randomly with -02.

Comment 1 Ben 2006-07-03 15:23:19 UTC
Note:
Something completely crazy is that.. if i slow down compilaton by adding sleeps
in the Makefile and not redirect stderr/out to a file, GCC works rather good and
do not segfault. Maybe it is pure co-incidence..  but that works! 8-]

Comment 2 Jakub Jelinek 2006-07-04 10:46:18 UTC
This is a typical sign of a hardware problem, be it bad memory, CPU cooling
problems (overheating) or other issues.  If this bug was in gcc, gcc would
manage to reproduce it 3 times in a row (as the gcc driver attempts to do),
the above message means that it couldn't be reproduced.