[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] segmentation fault in object.c:type_initialize_interface()

From: Liviu Ionescu
Subject: [Qemu-devel] segmentation fault in object.c:type_initialize_interface() if interface not defined
Date: Sun, 3 Apr 2016 01:15:53 +0300

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]