Skip to content
Snippets Groups Projects
Commit fd5d23ba authored by Iwona Kotlarska's avatar Iwona Kotlarska Committed by Dr. David Alan Gilbert
Browse files

hmp: fix "dump-quest-memory" segfault


Running QEMU with "qemu-system-x86_64 -M none -nographic -m 256" and executing
"dump-guest-memory /dev/null 0 8192" results in segfault.
Fix by checking if we have CPU.

Signed-off-by: default avatarIwona Kotlarska <iwona260909@gmail.com>
Message-Id: <20170330050924.22134-1-iwona260909@gmail.com>
Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: default avatarMarcel Apfelbaum <marcel@redhat.com>
Reviewed-by: default avatarEduardo Habkost <ehabkost@redhat.com>
Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
   Fixed up title
parent 05a6f451
No related branches found
No related tags found
No related merge requests found
......@@ -391,8 +391,7 @@ int cpu_get_dump_info(ArchDumpInfo *info,
#ifdef TARGET_X86_64
X86CPU *first_x86_cpu = X86_CPU(first_cpu);
lma = !!(first_x86_cpu->env.hflags & HF_LMA_MASK);
lma = first_cpu && (first_x86_cpu->env.hflags & HF_LMA_MASK);
#endif
if (lma) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment