qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 2/4] sysemu/os-win32: fix setjmp/longjmp on windows-arm64


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v3 2/4] sysemu/os-win32: fix setjmp/longjmp on windows-arm64
Date: Tue, 21 Feb 2023 15:27:37 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0

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.henderson@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.bouvier@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

[Prev in Thread] Current Thread [Next in Thread]