From 89f7c15e628147edd1cae5214827c8175e8fabd1 Mon Sep 17 00:00:00 2001 From: yujun Date: Mon, 29 Jun 2026 19:46:46 +0800 Subject: [PATCH] dump: fix misleading VMCOREINFO phys_base parse error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When qemu_strtou64() fails on the value after NUMBER(phys_base)= or NUMBER(PHYS_OFFSET)=, report a parse failure and include the malformed value. The previous message suggested the field name itself could not be read. Fixes: d9feb51772 ("dump: update phys_base header field based on VMCOREINFO content") Signed-off-by: yujun Acked-by: Marc-André Lureau Message-Id: <20260629114646.288664-1-yujun@kylinos.cn> --- dump/dump.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dump/dump.c b/dump/dump.c index 7fa2d6f788..52be7258a5 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -1772,7 +1772,8 @@ static void vmcoreinfo_update_phys_base(DumpState *s) if (prefix && g_str_has_prefix(lines[i], prefix)) { if (qemu_strtou64(lines[i] + strlen(prefix), NULL, 16, &phys_base) < 0) { - warn_report("Failed to read %s", prefix); + warn_report("failed to parse %s in VMCOREINFO: '%s'", + prefix, lines[i] + strlen(prefix)); } else { s->dump_info.phys_base = phys_base; }