Bug 160718
| Summary: | g++: Internal error: Segmentation fault (program cc1plus) | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 3 | Reporter: | Ben Barefield <bbarefield> | ||||||||||||||||||||||||||||||
| Component: | gcc | Assignee: | Jakub Jelinek <jakub> | ||||||||||||||||||||||||||||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||||||||||||||||||||||||||||
| Severity: | high | Docs Contact: | |||||||||||||||||||||||||||||||
| Priority: | medium | ||||||||||||||||||||||||||||||||
| Version: | 3.0 | ||||||||||||||||||||||||||||||||
| Target Milestone: | --- | ||||||||||||||||||||||||||||||||
| Target Release: | --- | ||||||||||||||||||||||||||||||||
| Hardware: | x86_64 | ||||||||||||||||||||||||||||||||
| OS: | Linux | ||||||||||||||||||||||||||||||||
| Whiteboard: | |||||||||||||||||||||||||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||||||||||||||||||||||||
| Doc Text: | Story Points: | --- | |||||||||||||||||||||||||||||||
| Clone Of: | Environment: | ||||||||||||||||||||||||||||||||
| Last Closed: | 2005-06-22 08:56:45 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: | |||||||||||||||||||||||||||||||||
| Attachments: |
|
||||||||||||||||||||||||||||||||
|
Description
Ben Barefield
2005-06-16 20:31:52 UTC
Created attachment 115562 [details]
file with bug in it
Created attachment 115563 [details]
neccessary file
Created attachment 115564 [details]
neccessary file
Created attachment 115565 [details]
neccessary file
Created attachment 115566 [details]
neccessary file
Created attachment 115567 [details]
neccessary file
Created attachment 115568 [details]
neccessary file
Created attachment 115569 [details]
neccessary file
Created attachment 115570 [details]
neccessary file
Created attachment 115571 [details]
neccessary file
Created attachment 115572 [details]
neccessary file
Created attachment 115573 [details]
neccessary file
Sorry for so many files and semi-ugly code. It is rough and hasn't been touched up yet. Please, can you instead: 1) post the full gcc (resp. g++) command line which causes the compiler crash 2) post the error output of that command 3) add -save-temps option to those alreadu used and rerun it 4) the last step creates an .i resp. .ii file, please attach it here A preprocessed file has the advantage that it is self-contained, therefore doesn't depend on the exact version of the system headers etc. You can look at http://gcc.gnu.org/bugs.html for details why is that preferrable. Thanks. "3) add -save-temps option to those alreadu used and rerun it" add that to what already used? I'm not sure what you want me to use that flag with. Say the full command line (as requested in 1) above) is g++ -g -O2 -fPIC -Wall -march=i686 -msse2 somefile.C and you get internal compiler error when compiling somefile.C with those options. Then for 3) you run also g++ -g -O2 -fPIC -Wall -march=i686 -msse2 somefile.C -save-temps and attach here somefile.ii it creates. The full command line to compile the file that causes the error is: g++ -g -Wall -c In_out.cpp and I get the error message: g++: Internal error: Segmentation fault (program cc1plus) Please submit a full bug report. See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions. make: *** [In_out.o] Error 1 (along with some unused variable warnings) Created attachment 115619 [details]
requested file
Created attachment 115620 [details]
the makefile
forgot to attach this last time, this is the makefile I use.
I would just like to give a small update. I took pretty much the same code (changed a litte for Microsoft's scoping) and it compiled fine on Visual C++. However, the reason I need it to compile on the Linux is so that I can compare its results to the results of something else. Thanks. The thing that the program is attempting to do (passing ~ 34.5MB argument by
value to Score(AEE, datavar)) requires that the stack is allowed to grow to
at least that size, but the default stack limit in RHEL3 is 8-10MB, see
ulimit -s (are you sure you did not mean to pass that argument by reference?).
Now, the compiler when compiling such program needs approximately the same size
on its stack as well. The compiler perhaps could detect excessively huge
argument size and use malloc instead of alloca for the temporary array it uses,
but you need bigger stack limit when running the program anyway and passing
> 8MB arguments by value is certainly not something the vast majority of
programs ever does. So I don't think this is something that needs to be
changed in RHEL3 errata.
Oh, forgot to say, if you compile with ulimit -s 40000 or ulimit -s unlimited, it will compile just fine. |