bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: c-stack: use libsigsegv when possible


From: Paul Eggert
Subject: Re: c-stack: use libsigsegv when possible
Date: Wed, 16 Jul 2008 15:19:08 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Eric Blake <address@hidden> writes:

> Should I also add lib-ignore to the
> dependencies of c-stack, so that Solaris need not waste space if
> libsigsegv is not used independently of c-stack?

Yes, please.

> In writing the patch, I noticed that it is probably not portable to
> longjmp out of a stack overflow handler - POSIX is explicit that longjmp
> is not async-signal safe, because the stack overflow might have occurred
> in the middle of a library function like malloc; even though you can
> manage to get back to the original stack, you no longer have guarantees
> that malloc will work.  So, we either need to document this in the
> contract of c_stack_action, or we need to add a function in c-stack.h that
> the user must call before attempting longjmp anyway; this wrapper would be
> responsible for calling libsigsegv's sigsegv_leave_handler as needed.
> Preferences?

I think it unlikely that this will be a practical problem, so I'd
just document it.

Thanks for doing the work.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]