|
From: | Richard Henderson |
Subject: | Re: [PATCH v2 2/4] sysemu/os-win32: fix setjmp/longjmp on windows-arm64 |
Date: | Thu, 16 Feb 2023 10:02:59 -1000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 |
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.
r~
[Prev in Thread] | Current Thread | [Next in Thread] |