All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] segmentation fault in object.c:type_initialize_interface() if interface not defined
@ 2016-04-02 22:15 Liviu Ionescu
  2016-04-03 12:28 ` Peter Maydell
  0 siblings, 1 reply; 10+ messages in thread
From: Liviu Ionescu @ 2016-04-02 22:15 UTC (permalink / raw)
  To: qemu-devel

I just updated GNU ARM Eclipse QEMU to 2.5.1 and initially I had some problems, main() failed quite early, in the first call to `find_default_machine()`.

After several debug sessions, I identified the problem to be a null pointer when a referred interface is not defined. In my Cortex-M specific configuration, `arm/boot.c` was not included in the build, but TYPE_ARM_LINUX_BOOT_IF was referred by TYPE_ARM_GIC_COMMON, the parent of my NVIC object.

I guess the problem is in `object.c:type_initialize()`, which does not check the pointer returned by:

`TypeImpl *t = type_get_by_name(ti->interfaces[i].typename)` 

and calls 

`type_initialize_interface(ti, t, t);` 

with the null pointers.


Normally an assert would be enough, but I don't know exactly which of your asserts better fit here, so I would abstain from submitting a patch.


Regards,

Liviu

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-04-03 21:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-02 22:15 [Qemu-devel] segmentation fault in object.c:type_initialize_interface() if interface not defined Liviu Ionescu
2016-04-03 12:28 ` Peter Maydell
2016-04-03 15:40   ` Liviu Ionescu
2016-04-03 16:43     ` Peter Maydell
2016-04-03 16:57       ` Liviu Ionescu
2016-04-03 17:01         ` Peter Maydell
2016-04-03 17:56           ` Liviu Ionescu
2016-04-03 21:30             ` Peter Maydell
2016-04-03 21:42               ` Liviu Ionescu
2016-04-03 21:59                 ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.