[PATCH 1/2] dump/win_dump: Abort in create_win_dump() on non-x86 hosts

Philippe Mathieu-Daudé posted 2 patches 1 month ago
Maintainers: "Marc-André Lureau" <marcandre.lureau@redhat.com>, Ani Sinha <anisinha@redhat.com>
There is a newer version of this series
[PATCH 1/2] dump/win_dump: Abort in create_win_dump() on non-x86 hosts
Posted by Philippe Mathieu-Daudé 1 month ago
win_dump_available() reports an error on non-x86 hosts
when Windows dump format is not available. In that case
win_dump_available() shouldn't be called, otherwise this
is a programming error: abort.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 dump/win_dump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dump/win_dump.c b/dump/win_dump.c
index 3162e8bd487..6e07913dfb4 100644
--- a/dump/win_dump.c
+++ b/dump/win_dump.c
@@ -489,7 +489,7 @@ bool win_dump_available(Error **errp)
 
 void create_win_dump(DumpState *s, Error **errp)
 {
-    win_dump_available(errp);
+    g_assert_not_reached();
 }
 
 #endif
-- 
2.52.0


Re: [PATCH 1/2] dump/win_dump: Abort in create_win_dump() on non-x86 hosts
Posted by Marc-André Lureau 1 month ago
Hi

On Wed, Jan 7, 2026 at 10:08 PM Philippe Mathieu-Daudé
<philmd@linaro.org> wrote:
>
> win_dump_available() reports an error on non-x86 hosts
> when Windows dump format is not available. In that case
> win_dump_available() shouldn't be called, otherwise this
> is a programming error: abort.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

(qmp_dump_guest_memory() should prevent that runtime error)

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

> ---
>  dump/win_dump.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/dump/win_dump.c b/dump/win_dump.c
> index 3162e8bd487..6e07913dfb4 100644
> --- a/dump/win_dump.c
> +++ b/dump/win_dump.c
> @@ -489,7 +489,7 @@ bool win_dump_available(Error **errp)
>
>  void create_win_dump(DumpState *s, Error **errp)
>  {
> -    win_dump_available(errp);
> +    g_assert_not_reached();
>  }
>
>  #endif
> --
> 2.52.0
>
>


-- 
Marc-André Lureau