From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Geert Bosch" To: "Anthony Green" , "Earl S. Harris, Jr." Cc: "gcc@gcc.gnu.org" Subject: Re: Catching stack overflow errors Date: Sun, 13 Aug 2000 13:45:00 -0000 Message-id: <20000813204345.858AF34D80@nile.gnat.com> X-SW-Source: 2000-08/msg00283.html 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