Am 30. September 2025 12:46:49 UTC schrieb Markus Armbruster
<[email protected]>:
>qemu_pixman_shareable_free() wraps around either qemu_memfd_free() or
>qemu_win32_map_free(). The former reports trouble as error, with
>error_report(), then succeeds. The latter reports it as warning (we
>pass it &error_warn), then succeeds.
>
>Change the latter to report as error, too.
>
>Cc: Marc-André Lureau <[email protected]>
>Signed-off-by: Markus Armbruster <[email protected]>
>Reviewed-by: Marc-André Lureau <[email protected]>
>Message-ID: <[email protected]>
>Reviewed-by: Akihiko Odaki <[email protected]>
>---
> ui/qemu-pixman.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
>diff --git a/ui/qemu-pixman.c b/ui/qemu-pixman.c
>index ef4e71da11..e46c6232cf 100644
>--- a/ui/qemu-pixman.c
>+++ b/ui/qemu-pixman.c
>@@ -288,7 +288,10 @@ qemu_pixman_shareable_free(qemu_pixman_shareable handle,
> void *ptr, size_t size)
> {
> #ifdef WIN32
>- qemu_win32_map_free(ptr, handle, &error_warn);
>+ Error *err = NULL;
>+
>+ qemu_win32_map_free(ptr, handle, &err);
>+ error_report_err(err);
The last line causes a crash on Windows since error_report_err() expects err to
be non-NULL. This can be reproduced by invoking `qemu-system-x86_64.exe`
without any parameters in msys2. Removing the line fixes the crash. I'm not
sure how to fix this, otherwise I had went for it myself.
Best regards,
Bernhard
> #else
> qemu_memfd_free(ptr, size, handle);
> #endif