This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Catching stack overflow errors
- To: "Anthony Green" <green at cygnus dot com>,"Earl S. Harris, Jr." <esharris at mitre dot org>
- Subject: Re: Catching stack overflow errors
- From: "Geert Bosch" <bosch at gnat dot com>
- Date: Sun, 13 Aug 2000 16:44:41 -0400
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Reply-To: "Geert Bosch" <bosch at gnat dot com>
On 11 Aug 2000 06:30:07 -0700, Anthony Green wrote:
It is also important for other languages supported by GCC. Java
implementations are required to throw exceptions when a stack is blown
but gcj currently ignores this.
One of the weaknesses currently in GCC is that under certain
circumstances the fixed portion of the stack frame can get
larger than the amount of storage which is guaranteed to be
available when the function is called (typically 1 page, or 4kB)
Even though there is a warning "stack frame too large, reduce
number of locals", this is not that helpful especially if many
of the locals are temporaries introduced by the compiler during
expansion of certain constructs.
GCC has some hacks that try to allocate anyting big in the dynamic
portion of the frame, but this only masks the problems and leads
to unnecessarily inefficient code.
-Geert