Bug 1125060

Summary: g++: internal compiler error: Segmentation fault (program cc1plus)
Product: [Fedora] Fedora Reporter: jonasarias
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jakub, law
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-29 16:07:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
example none

Description jonasarias 2014-07-31 02:02:46 UTC
Created attachment 922789 [details]
example

Description of problem:

g++: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make: *** [main.o] Error 4


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


How reproducible: Compiling files with size 200MB


Steps to Reproduce:
0. The replication will require installation of several libraries. I can provide the full explanation if necessary. But at this point (since the folder exceeds the size limit below) I am sending you an example of one of the files that we are including into our cpp program as a header. 
1. Please find attached an example of one of the files that the programs needs to compile.
2. There are 58 files of similar size and
3. and they are used to construct an array using a main.cpp file.


Actual results:

g++: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make: *** [main.o] Error 4

Expected results:

Successful compilation


Additional info:

Comment 1 Jakub Jelinek 2014-09-01 11:13:27 UTC
You might be overflowing the default limited 10MB stack with that kind of generated files, try using ulimit -s unlimited or some larger value before running g++, or fix up your generator, so that it uses temporary variables to avoid hundreds of thousands of expressions in a single statement.