On 21/2/23 14:16, Pierrick Bouvier wrote:
On 2/21/23 11:33, Philippe Mathieu-Daudé wrote:
On 21/2/23 10:47, Pierrick Bouvier wrote:
@Philippe Mathieu-Daudé, is that version satisfying for you, regarding
your initial comments about setjmp/longjmp detection in meson?

Yes, the meson check is what I had in mind.

I can integrate more changes if needed.

Thanks,
Pierrick

On 2/20/23 16:16, Pierrick Bouvier wrote:
Acked-by: Richard Henderson <richard.hender...@linaro.org>

On 2/20/23 12:12, 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.bouv...@linaro.org>
---
    include/sysemu/os-win32.h | 25 +++++++++++++++++++++++--
    meson.build               | 24 ++++++++++++++++++++++++
    2 files changed, 47 insertions(+), 2 deletions(-)


-#if defined(_WIN64)
+#if defined(__aarch64__)
+#ifndef CONFIG_MINGW64_HAS_SETJMP_LONGJMP
+#error mingw must provide setjmp/longjmp for windows-arm64

Per the meson error [*], this now seems impossible, thus we can
simply drop the CONFIG_MINGW64_HAS_SETJMP_LONGJMP definition?


I think it's redundant too.

-#endif
+#endif /* __aarch64__ */

This comment doesn't seem accurate. Maybe "64-bit"?


I'd like to use windows-x64. IMHO,  it's clearer and on par with windows-arm64. But I know some people don't like x64 nomenclature.

Fine by me :)


Reply via email to