Bug 197510 - internal compiler error: Segmentation fault (with -O3 -fPIC)
internal compiler error: Segmentation fault (with -O3 -fPIC)
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: gcc3 (Show other bugs)
4.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-03 09:12 EDT by Ben
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-07-04 06:46:18 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 Ben 2006-07-03 09:12:09 EDT
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 11:23:19 EDT
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 06:46:18 EDT
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.

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