Re: [Qemu-devel] [PATCH for-1.2] hw/arm_gic.c: Define .class_size in arm_gic_info TypeInfo

2012-08-30 Thread Andreas Färber
Am 29.08.2012 20:57, schrieb Stefan Weil: PS. Are there perhaps more bugs of this sort? A quick test looking for .class_init without .class_size shows a lot of files. That alone is not wrong. A problem only arises when a new struct ...Class is casted to but the object not sized appropriately

[Qemu-devel] [PATCH for-1.2] hw/arm_gic.c: Define .class_size in arm_gic_info TypeInfo

2012-08-29 Thread Peter Maydell
Add the missing .class_size definition to the arm_gic_info TypeInfo. This fixes the memory corruption and possible segfault that otherwise results when the class struct is allocated at too small a size and the class init function writes off the end of it. Reported-by: Adam Lackorzynski

Re: [Qemu-devel] [PATCH for-1.2] hw/arm_gic.c: Define .class_size in arm_gic_info TypeInfo

2012-08-29 Thread Stefan Weil
Am 29.08.2012 09:52, schrieb Peter Maydell: Add the missing .class_size definition to the arm_gic_info TypeInfo. This fixes the memory corruption and possible segfault that otherwise results when the class struct is allocated at too small a size and the class init function writes off the end of