setjmp + longjump + sigaltstack is indeed the old trick.