Re: Weird startup issue with -fsplit-stack

2014-06-10 Thread Ian Lance Taylor
On Tue, Jun 10, 2014 at 7:54 AM, Dmitry Antipov wrote: > 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

Re: Weird startup issue with -fsplit-stack

2014-06-10 Thread Dmitry Antipov
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 recur

Re: Weird startup issue with -fsplit-stack

2014-05-21 Thread Ian Lance Taylor
On Tue, May 20, 2014 at 10:30 PM, Dmitry Antipov wrote: > > The next major problem is that -fsplit-stack code randomly crashes with the > useless gdb backtrace, usually pointing to the very beginning of the > function > (plus occasional "Cannot access memory at..." messages), e.g.: > > (gdb) bt 1

Re: Weird startup issue with -fsplit-stack

2014-05-20 Thread Dmitry Antipov
On 05/20/2014 10:16 PM, Ian Lance Taylor wrote: This is the call to __morestack_block_signals in morestack.S. It should only be possible if __morestack_block_signals or something it calls directly has a split stack. __morestack_block_signals has the no_split_stack attribute, meaning that it sh

Re: Weird startup issue with -fsplit-stack

2014-05-20 Thread Ian Lance Taylor
On Tue, May 20, 2014 at 7:18 AM, Dmitry Antipov wrote: > > I'm trying to support -fsplit-stack in GNU Emacs. The most important problem > is that > GC uses conservative scanning of a C stack, so I need to iterate over stack > segments. > I'm doing this by using __splitstack_find, as described in

Weird startup issue with -fsplit-stack

2014-05-20 Thread Dmitry Antipov
Hello, I'm trying to support -fsplit-stack in GNU Emacs. The most important problem is that GC uses conservative scanning of a C stack, so I need to iterate over stack segments. I'm doing this by using __splitstack_find, as described in libgcc/generic-morestack.c; but now I'm facing the weird