This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Weird startup issue with -fsplit-stack
- From: Dmitry Antipov <dmantipov at yandex dot ru>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Tue, 10 Jun 2014 18:54:22 +0400
- Subject: Re: Weird startup issue with -fsplit-stack
- Authentication-results: sourceware.org; auth=none
- Authentication-results: smtp4o.mail.yandex.net; dkim=pass header dot i= at yandex dot ru
- References: <537B6443 dot 2050807 at yandex dot ru> <CAKOQZ8y0Y4C9wsXqLoHW-4P80=cNBGgn=Toqy-ArdLuEWmJW5w at mail dot gmail dot com> <537C39F4 dot 4090700 at yandex dot ru> <CAKOQZ8x1y-fktm0QVw4WU5YW5tvJByFCsgP3xn+drZibycC67Q at mail dot gmail dot com>
On 05/21/2014 06:10 PM, Ian Lance Taylor wrote:
I'm sorry, I have nothing useful to suggest. I agree that that sounds
like a stack overflow, which should in general be impossible with
-fsplit-stack when using the gold linker. I don't know what is
happening here. I've tested with massive recursion so I don't think
that is the problem by itself.
Hm...did you test with a lot of longjmps? I'm just curious about this
comment in libgcc/generic-morestack.c:
/* The stack segment that we think we are currently using. This will
be correct in normal usage, but will be incorrect if an exception
unwinds into a different stack segment or if longjmp jumps to a
different stack segment. */
So, what happens if longjmp jumps to a different segment? Is the result
undefined? Is it possible to detect such a jump?
Dmitry