This is the mail archive of the
mailing list for the GCC project.
Re: 'stack overflow' message for Darwin; host hooks
- From: Geoffrey Keating <geoffk at apple dot com>
- To: Fergus Henderson <fjh at cs dot mu dot oz dot au>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 7 Feb 2003 11:39:31 -0800
- Subject: Re: 'stack overflow' message for Darwin; host hooks
On Friday, February 7, 2003, at 08:01 AM, Fergus Henderson wrote:
Right, but that's not this patch; that would require kernel changes to
change the signal sent. If you look at where the 'bus error' message
comes from, it's because the signal sent is (reported as) SIGBUS. To
get a different message, you'd need to report some other signal. Then
you get into issues about backwards binary compatibility...
On 06-Feb-2003, Geoffrey Keating <email@example.com> wrote:
On Wednesday, February 5, 2003, at 11:32 PM, Fergus Henderson wrote:
On 05-Feb-2003, Geoffrey Keating <firstname.lastname@example.org> 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
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?
Sure, I saw the comment first time around, but the code could
(It's worth pointing out that, as the comment says, this code will not
necessarily work for programs other than GCC.)
be fixed to handle AltiVec etc.
Even if the error message just says "This is _probably_ a stack
All this is interesting, but it's not really a GCC issue. Feel free to
lobby the FreeBSD or Darwin folks for a SIGSTKOVERFLOW or whatever.
it would IMHO be a vast improvement on "Bus Error" in >99% of cases.
Geoff Keating <email@example.com>