This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: 'stack overflow' message for Darwin; host hooks
- From: Geoffrey Keating <geoffk at apple dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 6 Feb 2003 12:54:51 -0800
- Subject: Re: 'stack overflow' message for Darwin; host hooks
On Thursday, February 6, 2003, at 12:34 PM, Zack Weinberg wrote:
Geoffrey Keating <geoffk@apple.com> writes:
On Wednesday, February 5, 2003, at 10:20 PM, Zack Weinberg wrote:
Cute, but would you mind putting some thought into a way to avoid a
re-proliferation of x-fragments? I went to considerable effort to
get
within epsilon of being able to eliminate that facility entirely.
Yes, there's a way to eliminate all the new x-fragments and a bunch of
t-fragments too: automatic dependency generation.
Okay, that gives me additional incentive to get automatic dependency
generation going. (I have a plan; finding time is another question.)
I'd really like automatic dependencies. Our dependencies keep getting
out-of-date.
I thought we had code in toplev.c to call rlimit() to set the soft
stack limit as high as it could go, rather than bothering the user
about it.
No, we don't; that would be bad, if the user sets a limit we should
honour it.
I'm of two minds here. On the one hand, honoring the user's limits is
a good thing; on the other hand, we know that the default stack limit
is too low for us on Darwin and it seems to me that we ought not to
make the user worry about that.
It's too low for some highly atypical test cases, but in real programs
the limit is not a problem.
Maybe the *real* right thing is to figure out why we still need so
much stack and change that. I remember that some work was done in
the past on allocating huge arrays with malloc instead of alloca...
I haven't investigated all the cases, but at least for one test case
the cause was real recursion in walk_tree (thousands of levels deep).