projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5900d6b
)
target-alpha: Detect attempt to instantiate non-CPU type in cpu_init()
author
Andreas Färber
<afaerber@suse.de>
Mon, 21 Jan 2013 16:27:54 +0000
(17:27 +0100)
committer
Andreas Färber
<afaerber@suse.de>
Sun, 27 Jan 2013 13:52:05 +0000
(14:52 +0100)
Check in alpha_cpu_class_by_name() whether the type found is actually
(a sub-type of) TYPE_ALPHA_CPU.
This fixes, e.g., -cpu typhoon-pcihost asserting.
Signed-off-by: Andreas Färber <afaerber@suse.de>
target-alpha/cpu.c
patch
|
blob
|
history
diff --git
a/target-alpha/cpu.c
b/target-alpha/cpu.c
index
3ac0fde
..
0d6975e
100644
(file)
--- a/
target-alpha/cpu.c
+++ b/
target-alpha/cpu.c
@@
-96,7
+96,7
@@
static ObjectClass *alpha_cpu_class_by_name(const char *cpu_model)
}
oc = object_class_by_name(cpu_model);
- if (oc != NULL) {
+ if (oc != NULL
&& object_class_dynamic_cast(oc, TYPE_ALPHA_CPU) != NULL
) {
return oc;
}