This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/5818: cc1plus crashes if it runs out of memory
- From: lloyd at acm dot jhu dot edu
- To: gcc-gnats at gcc dot gnu dot org
- Date: 3 Mar 2002 17:06:35 -0000
- Subject: c++/5818: cc1plus crashes if it runs out of memory
- Reply-to: lloyd at acm dot jhu dot edu
>Number: 5818
>Category: c++
>Synopsis: cc1plus crashes if it runs out of memory
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Mar 03 09:16:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: lloyd@acm.jhu.edu
>Release: gcc 3.0.4
>Organization:
>Environment:
Redhat Linux 7.2
AMD Athlon
>Description:
Very minor. I was having problems with a bug causing the allocation of hundreds of megabytes of memory, swapping my machine to death, so I set my memory ulimts to something like 16 megabytes. Then I compiled some code. A few times, GCC died with warnings that virtual memory was exausted. But once, I got this:
g++: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
So it seems that in at least one case, GCC isn't checking it's system call returns properly (GCC compiles my code without problems when the memory ulimits are set higher, so I'm quite certain this is not a code-dependant thing)
>How-To-Repeat:
Set your ulimits for memory very low. Compile something.
>Fix:
Make sure malloc doesn't return zero? :)
>Release-Note:
>Audit-Trail:
>Unformatted: