|
From: | Thomas Huth |
Subject: | Re: Crashes with qemu-system-ppc64 |
Date: | Wed, 24 Mar 2021 11:10:01 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 |
On 24/03/2021 00.35, Philippe Mathieu-Daudé wrote: [...]
Hmmm does this assert() matches your comment? -- >8 -- diff --git a/hw/core/qdev.c b/hw/core/qdev.c index cefc5eaa0a9..41cbee77d14 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -1130,6 +1130,8 @@ Object *qdev_get_machine(void) { static Object *dev; + assert(phase_check(PHASE_MACHINE_CREATED)); + if (dev == NULL) { dev = container_get(object_get_root(), "/machine"); }
Sounds like a good idea, but I think it should be sufficient to put it into the if-statement instead.
Could you send it as a proper patch? Thomas
[Prev in Thread] | Current Thread | [Next in Thread] |