On 08/06/2015 03:12 AM, Stefan Weil wrote: > (sig)setjmp/(sig)longjmp without TCG generated code on the stack > does not need special handling because stack unwinding works > for compiled normal C code. > > We only have a problem on 64 bit Windows with code generated > at run time by TCG because stack unwinding does not work there, > so a siglongjmp which tries to exit from that code will crash QEMU > when trying to unwind the call stack.
I suppose we could fix that, for 2.5, anyway. It would appear that RtlAddFunctionTable is the proper interface. It would probably also help debugging just as much as adding the elf unwind info did. > As far as I see, the only siglongjmp exits from TCG generated code > are in cpu-exec.c (functions cpu_loop_exit and > cpu_resume_from_signal). The matching sigsetjmp is also in > cpu-exec.c, and here we have to disable stack unwinding > by calling _setjmp(cpu->jmp_env, NULL). That sounds right. r~