This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Catching stack overflow errors


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]