This is the mail archive of the
mailing list for the GCC project.
Re: 'stack overflow' message for Darwin; host hooks
- From: Fergus Henderson <fjh at cs dot mu dot OZ dot AU>
- To: Geoffrey Keating <gkeating at apple dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 6 Feb 2003 18:32:38 +1100
- Subject: Re: 'stack overflow' message for Darwin; host hooks
- References: <200302060117.h161HYcg002362@keatge.apple.com>
On 05-Feb-2003, Geoffrey Keating <email@example.com> wrote:
> This patch does two thing:
> 1. It establishes a system for host-specific callbacks. The system is
> way too elaborate for the trivial purpose in the patch, but I plan
> do extend it later to add host-specific ways to detect that we
> don't need to do a GC collection right now, and to perform
> incremental GC.
> 2. It fixes an annoying UI issue with GCC on Darwin. Darwin has the
> default soft stack limit set to 512k, which can be easily tripped
> over; in fact, some tests in the GCC testsuite hit it. Before,
> when this happened GCC would print 'Internal error: bus error',
> which is an incredibly unhelpful error message; now it prints
> 'Out of stack memory.' and a message saying how to change the
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?
> Index: config/rs6000/host-darwin.c
> +/* On Darwin/powerpc, a stack fault can be detected as a SIGSEGV that
> + faulted on an instruction that's either
> + or
> + stwux %r1,xxx,%r1
There seems to be something missing in that comment: either *what* or stwux...?
Shouldn't the comment here match the code below?
> + if ((faulting_insn & 0xFFFF8000) == 0x94218000 /* stwu %r1, -xxx(%r1) */
> + || (faulting_insn & 0xFFFF03FF) == 0x7C21016E /* stwux %r1, xxx, %r1 */
> + || (faulting_insn & 0xFC1F8000) == 0x90018000 /* stw xxx, -yyy(%r1) */
> + || (faulting_insn & 0xFC1F8000) == 0xD8018000 /* stfd xxx, -yyy(%r1) */
> + || (faulting_insn & 0xFC1F8000) == 0xBC018000 /* stmw xxx, -yyy(%r1) */)
Fergus Henderson <firstname.lastname@example.org> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.