On Sat, Jul 27, 2013 at 12:12:57PM -0400, Rich Felker wrote: > By the way, I do have another horrible idea for how you could do it. > glibc's jmp_buf is actually a sigjmp_buf and contains 120 wasted bytes > of sigset_t for nonexistant HURD signals. So you could store a few > registers after the actually-used part of the sigset_t.
And another, possibly more acceptable way to do it: #define setjmp(x) __new_setjmp(x, (__new_jmp_buf){0}, sizeof(__new_jmp_buf)) This would allocate the extra space on the caller's stack with a lifetime equivalent to the validity lifetime of the jmp_buf, so it should be valid, but I'm not sure if it covers all the needed cases for interaction between old code and new code. Rich