mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:10 +00:00
dump: fix misleading VMCOREINFO phys_base parse error
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 <yujun@kylinos.cn>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260629114646.288664-1-yujun@kylinos.cn>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user