On 2/16/23 03:49, Pierrick Bouvier wrote:
Windows implementation of setjmp/longjmp is done in
C:/WINDOWS/system32/ucrtbase.dll. Alas, on arm64, it seems to *always*
perform stack unwinding, which crashes from generated code.
By using alternative implementation built in mingw, we avoid doing stack
unwinding and this fixes crash when calling longjmp.
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
include/sysemu/os-win32.h | 21 +++++++++++++++++++--
meson.build | 22 ++++++++++++++++++++++
2 files changed, 41 insertions(+), 2 deletions(-)
Ugly, but workable.
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Ideally we'd interact properly with system unwinding. It looks like we'd use
RtlAddFunctionTable, but the documentation is spread out and I've not found all
of the bits.
We already do something similar for gdb -- see tcg/tcg.c, tcg_register_jit_int,
and
tcg/aarch64/tcg-target.c.inc, debug_frame.