Bug 114519 - g++: Internal error: segmentation fault (program cc1plus)
Summary: g++: Internal error: segmentation fault (program cc1plus)
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: gcc
Version: 2.1
Hardware: ia64
OS: Linux
high
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-01-29 00:46 UTC by Michael Chynoweth
Modified: 2012-06-20 13:24 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 13:24:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Reproducer for huge table issues (4.27 KB, application/zip)
2004-04-28 16:43 UTC, Michael Chynoweth
no flags Details

Description Michael Chynoweth 2004-01-29 00:46:10 UTC
Description of problem:
We are having a segmentatoin fault in cc1plus.  Occurs even when 
compiling in debug /Od or with /O2.

Version-Release number of selected component (if applicable):
Red Hat Linux 7.2 2.96-124.7.2

How reproducible:
If I can figure out where it is crashing while compiling the source I 
could probably create a safe reproducer to send out.  I just need to 
find out some techniques for finding compile time crashes with the 
gcc compiler.

Steps to Reproduce:
1.  Find a technique for finding where in the code it is crashing.
2.  Reproduce with a innocuous test case
3.  
  
Actual results:


Expected results:


Additional info:

Comment 1 Michael Chynoweth 2004-01-29 19:11:49 UTC
Hi Jed,

I threw the -Q option on the source files and was able to tell that 
it is crashing after a destructor to a template.  The most recent 
function is __tcf_1.  This is not a function within the source so I 
am not sure what this function is.

Thanks,

Mike

Comment 2 Michael Chynoweth 2004-01-31 19:05:11 UTC
We have narrowed down this bug.  It looks like the crash in gcc 
compile is due to a compilation of a table with ~100,000 entries.  I 
will have a reproducer by Monday.

Comment 3 Suzanne Hillman 2004-02-06 18:33:14 UTC
It's past Monday. Have you a reproducer?

Comment 4 Jakub Jelinek 2004-02-09 15:58:32 UTC
Ideally in the form of preprocessed source (.ii file) created with
g++ -save-temps plus the options you used.

Comment 5 Michael Chynoweth 2004-02-09 16:26:39 UTC
Unfortunately I cannot share source in this case.  I tried to create 
a good reproducer and it failed to recreate the crash.  I have 
started to split up the large table to determine when it crashes.  
Give me 1.5 weeks to get a good reproducer.

Thanks,

Mike

Comment 7 Michael Chynoweth 2004-04-28 16:43:16 UTC
Created attachment 99740 [details]
Reproducer for huge table issues

Hi RedHat,

Here is a reproducer for the huge table problem.  I apologize this took me so
long...I had some other items to look into.

It looks like the problem is that gcc is overrunning its stack when compiling
this huge table.  If I boost up the limit of stack to a ridiculously high value
(ulimit -s 262144), the issue goes away.

I included a simple test case just incase you wanted to put in some meaningful
error here, but from my side you can go ahead and close this bug.

Version is the same:  gcc-c++-2.96-124.7.2

Thanks for taking a look into this,

Mike

Comment 8 Michael Chynoweth 2004-04-28 16:46:17 UTC
Forgot to add.  To run the test case put in run.sh.

Thanks,

Mike

Comment 9 Richard Henderson 2004-10-04 18:36:09 UTC
For the record, RHEL3 with gcc 3.2.3-24 *just* compiles this test case
with the default 10MB stack.  Either that or ulimit -s 9216 has other
more serious process creation issues.

Stack overflow conditions are notoriously difficult to recover from in
any friendly way.  For a project in the support state of gcc 2.96, I
don't think we want to get into the kind of churn that would be required
in order to fix or diagnose this condition in anything like a reliable
way.  So if Mike is happy increasing stack size, then I'm happy, and
we can close.

Comment 10 Michael Chynoweth 2004-10-05 20:36:14 UTC
I am happy so we can close.

Thanks,

Mike

Comment 11 Jiri Pallich 2012-06-20 13:24:14 UTC
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. 
Please See https://access.redhat.com/support/policy/updates/errata/

If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.


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