This is the mail archive of the 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]
Other format: [Raw text]

Re: 'stack overflow' message for Darwin; host hooks

On 06-Feb-2003, Geoffrey Keating <> wrote:
> On Wednesday, February 5, 2003, at 11:32  PM, Fergus Henderson wrote:
> >On 05-Feb-2003, Geoffrey Keating <> wrote:
> >Is there some important reason why you don't want this signal handler 
> >to be the default handler for all applications on Darwin, not just for GCC?
> >Why not patch Darwin's libc rather than GCC?
> That would be a decision for other applications.  Most applications, 
> don't use unbounded amounts of stack space the way that GCC can.

But the error message will only be printed if those applications do
run out of stack space.  If an application runs out of stack space,
why would it *ever* be better to issue the error message "Bus Error"
rather than "Stack Overflow"??

Let me put this bluntly:

	The default treatment of stack overflow on Unix is ATROCIOUS. 

	Issuing a reasonable error message is really not that difficult.
	Why not do it?

Is this just a case of keeping with the existing (atrocious behaviour
because that's the way it has always been done?

> (It's worth pointing out that, as the comment says, this code will not 
> necessarily work for programs other than GCC.)

Sure, I saw the comment first time around, but the code could presumably
be fixed to handle AltiVec etc.

Even if the error message just says "This is _probably_ a stack overflow"
it would IMHO be a vast improvement on "Bus Error" in >99% of cases.

Fergus Henderson <>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <>  |     -- the last words of T. S. Garp.

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