[Ecls-list] Patch: remove sbrk() usage in handle_signal()

Josh Elsasser josh at elsasser.org
Sat Oct 4 19:47:41 UTC 2008


On Sat, Oct 04, 2008 at 09:28:01PM +0200, Juan Jose Garcia-Ripoll wrote:
> On Sat, Oct 4, 2008 at 9:16 PM, Josh Elsasser <josh at elsasser.org> wrote:
> > The new stack overflow detection code uses sbrk(), which is not
> > portable.  I'm guessing that it was used to detect if the signal
> > handler was executing on the alternate signal stack, if that is the
> > case then sigaltstack() would be the portable way to test for that.
> 
> Hmmm, I am not sure sigaltstack() does what you are expecting. The
> SIGSEGV signal handler will _always_ execute in the alternative stack
> and hence your test will always be true.

Hm, what is it that (sbrk(0) < info->si_addr) is testing for then?




More information about the ecl-devel mailing list