Skip to content
Commit 5b863f3e authored by Eduardo Habkost's avatar Eduardo Habkost
Browse files

cpu: Fix crash with empty -cpu option



Fix the following crash:

  $ qemu-system-x86_64 -cpu ''
  qemu-system-x86_64: qom/cpu.c:291: cpu_class_by_name: \
      Assertion `cpu_model && cc->class_by_name' failed.

Regression test script included.

Fixes: 99193d8f ("cpu: drop unnecessary NULL check and cpu_common_class_by_name()")
Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
Message-Id: <20190418034501.5038-1-ehabkost@redhat.com>
Reviewed-by: default avatarStefano Garzarella <sgarzare@redhat.com>
Tested-by: default avatarStefano Garzarella <sgarzare@redhat.com>
Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
parent c1c8cfe5
Loading
Loading
Loading
Loading
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