diff options
Diffstat (limited to 'qemu/target-unicore32/cpu.c')
-rw-r--r-- | qemu/target-unicore32/cpu.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/qemu/target-unicore32/cpu.c b/qemu/target-unicore32/cpu.c index fc451a1a3..66f43acff 100644 --- a/qemu/target-unicore32/cpu.c +++ b/qemu/target-unicore32/cpu.c @@ -12,6 +12,8 @@ * or (at your option) any later version. */ +#include "qemu/osdep.h" +#include "qapi/error.h" #include "cpu.h" #include "qemu-common.h" #include "migration/vmstate.h" @@ -155,6 +157,13 @@ static void uc32_cpu_class_init(ObjectClass *oc, void *data) cc->get_phys_page_debug = uc32_cpu_get_phys_page_debug; #endif dc->vmsd = &vmstate_uc32_cpu; + + /* + * Reason: uc32_cpu_initfn() calls cpu_exec_init(), which saves + * the object in cpus -> dangling pointer after final + * object_unref(). + */ + dc->cannot_destroy_with_object_finalize_yet = true; } static void uc32_register_cpu_type(const UniCore32CPUInfo *info) |