On 06-Feb-2003, Geoffrey Keating <geoffk@apple.com> wrote:
On Wednesday, February 5, 2003, at 11:32 PM, Fergus Henderson wrote:
On 05-Feb-2003, Geoffrey Keating <gkeating@apple.com> 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"??
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...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.