Support setjmp in x86-64 psABI with AVX-512

Ondřej Bílka neleai@seznam.cz
Sun Jul 28 06:25:00 GMT 2013


On Sat, Jul 27, 2013 at 04:09:22PM -0400, Rich Felker wrote:
> On Sat, Jul 27, 2013 at 08:27:07PM +0200, Ondřej Bílka wrote:
> > On Sat, Jul 27, 2013 at 12:12:57PM -0400, Rich Felker wrote:
> > > On Sat, Jul 27, 2013 at 05:44:05PM +0200, Ondřej Bílka wrote:
> > > This required unbounded storage which does not exist. From a practical
> > > standpoint you would either have to reserve a huge amount of storage
> > > (e.g. double the allocated thread stack size and use half of it as
> > > reserved space for jmp_buf) or make the calling program crash when the
> > 
> > Standard trick mmap and double.
> 
> ??

When you cannot allocate memory by malloc and performance is not concern
use mmap.

> > Next idea would be hack gcc to mark all variables volatile in functions
> > with setjmp.
> 
> That does not help. setjmp may not be backing up the caller's
> variables, but rather register values belonging to
> 
>     (the caller of)^N the caller

So additional saving/restoring that registers at entry/exit would be
needed.

-- 



More information about the Libc-alpha mailing list