"Joseph S. Myers" <jos...@codesourcery.com> writes:

> On Wed, 21 Mar 2012, Dennis Clarke wrote:
>
>>     What I find interesting is why we see an internal compiler error
>> as opposed to something more reasonable when the user stack size is
>> too small. Really, this is not a compiler fault at all but a user
>> environment issue and thus the ICE is a false alarm.

Btw., the problem is long known: PR c/35608.

> I suppose we could use sigaltstack where available and a signal handler to 
> detect stack overflow on suitable hosts to give a better message.

Agreed.

> It ought to be possible to use -fsplit-stack to avoid stack overflow - it 
> would be interesting to know if that works (if GCC is built with 
> -fsplit-stack, and linked with gold, on a host for which this is properly 
> supported) and how it affects GCC's performance.

That's a Linux-only option, unfortunately.  I asked the Solaris
engineers about implementing split-stack support, but they rejected it
for the complexity.

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to