qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 00/74] qom: Automated conversion of type checking boilerpl


From: Roman Bolshakov
Subject: Re: [PATCH v3 00/74] qom: Automated conversion of type checking boilerplate
Date: Wed, 26 Aug 2020 13:22:38 +0300

On Tue, Aug 25, 2020 at 03:19:56PM -0400, Eduardo Habkost wrote:
> git tree for this series:
> https://github.com/ehabkost/qemu-hacks/tree/work/qom-macros-autoconvert
> 

Hi Eduardo,

another assert fires during QEMU start:

$ lldb -- $QEMU -cpu nahelem -M q35,accel=hvf -cdrom test.iso
(lldb) target create "[...]/qemu/build/qemu-system-x86_64"
Current executable set to '[...]/qemu/build/qemu-system-x86_64' (x86_64).
(lldb) settings set -- target.run-args  "-cpu" "nahelem" "-M" "q35,accel=hvf" 
"-cdrom" "test.iso"
(lldb) r
Process 92411 launched: '[...]/qemu/build/qemu-system-x86_64' (x86_64)
**
ERROR:../qom/object.c:505:object_initialize_with_type: assertion failed: (size 
>= type->instance_size)
Bail out! ERROR:../qom/object.c:505:object_initialize_with_type: assertion 
failed: (size >= type->instance_size)
Process 92411 stopped
* thread #3, stop reason = signal SIGABRT
    frame #0: 0x00007fff6a75e33a libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill:
->  0x7fff6a75e33a <+10>: jae    0x7fff6a75e344            ; <+20>
    0x7fff6a75e33c <+12>: movq   %rax, %rdi
    0x7fff6a75e33f <+15>: jmp    0x7fff6a758629            ; cerror_nocancel
    0x7fff6a75e344 <+20>: retq
Target 0: (qemu-system-x86_64) stopped.
(lldb) bt
* thread #3, stop reason = signal SIGABRT
  * frame #0: 0x00007fff6a75e33a libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff6a81ae60 libsystem_pthread.dylib`pthread_kill + 430
    frame #2: 0x00007fff6a6e5808 libsystem_c.dylib`abort + 120
    frame #3: 0x0000000101314c36 libglib-2.0.0.dylib`g_assertion_message + 406
    frame #4: 0x0000000101314c9e libglib-2.0.0.dylib`g_assertion_message_expr + 
94
    frame #5: 0x0000000100366f0c 
qemu-system-x86_64`object_initialize_with_type(obj=<unavailable>, 
size=<unavailable>, type=<unavailable>) at object.c:505:5 [opt]
    frame #6: 0x0000000100400e48 
qemu-system-x86_64`qbus_create_inplace(bus=0x0000000000000000, 
size=<unavailable>, typename=<unavailable>, parent=0x0000000000000000, 
name="main-system-bus") at bus.c:153:5 [opt]
    frame #7: 0x000000010006800a qemu-system-x86_64`sysbus_get_default 
[inlined] main_system_bus_create at sysbus.c:346:5 [opt]
    frame #8: 0x0000000100067fe2 qemu-system-x86_64`sysbus_get_default at 
sysbus.c:354 [opt]
    frame #9: 0x00000001002b774f 
qemu-system-x86_64`qemu_init(argc=<unavailable>, argv=<unavailable>, 
envp=<unavailable>) at vl.c:3890:41 [opt]
    frame #10: 0x0000000100008c99 
qemu-system-x86_64`qemu_main(argc=<unavailable>, argv=<unavailable>, 
envp=<unavailable>) at main.c:49:5 [opt]
    frame #11: 0x000000010007bbd6 
qemu-system-x86_64`call_qemu_main(opaque=<unavailable>) at cocoa.m:1710:14 [opt]
    frame #12: 0x00000001004631ee 
qemu-system-x86_64`qemu_thread_start(args=<unavailable>) at 
qemu-thread-posix.c:521:9 [opt]
    frame #13: 0x00007fff6a81b109 libsystem_pthread.dylib`_pthread_start + 148
    frame #14: 0x00007fff6a816b8b libsystem_pthread.dylib`thread_start + 15
(lldb) f 7
qemu-system-x86_64 was compiled with optimization - stepping may behave oddly; 
variables may not be available.
frame #7: 0x000000010006800a qemu-system-x86_64`sysbus_get_default [inlined] 
main_system_bus_create at sysbus.c:346:5 [opt]
   343      /* assign main_system_bus before qbus_create_inplace()
   344       * in order to make "if (bus != sysbus_get_default())" work */
   345      main_system_bus = g_malloc0(system_bus_info.instance_size);
-> 346      qbus_create_inplace(main_system_bus, system_bus_info.instance_size,
   347                          TYPE_SYSTEM_BUS, NULL, "main-system-bus");
   348      OBJECT(main_system_bus)->free = g_free;
   349  }
(lldb) f 6
frame #6: 0x0000000100400e48 
qemu-system-x86_64`qbus_create_inplace(bus=0x0000000000000000, 
size=<unavailable>, typename=<unavailable>, parent=0x0000000000000000, 
name="main-system-bus") at bus.c:153:5 [opt]
   150  void qbus_create_inplace(void *bus, size_t size, const char *typename,
   151                           DeviceState *parent, const char *name)
   152  {
-> 153      object_initialize(bus, size, typename);
   154      qbus_init(bus, parent, name);
   155  }
   156
(lldb) f 5
frame #5: 0x0000000100366f0c 
qemu-system-x86_64`object_initialize_with_type(obj=<unavailable>, 
size=<unavailable>, type=<unavailable>) at object.c:505:5 [opt]
   502
   503      g_assert(type->instance_size >= sizeof(Object));
   504      g_assert(type->abstract == false);
-> 505      g_assert(size >= type->instance_size);
   506
   507      memset(obj, 0, type->instance_size);
   508      obj->class = type->class;

Regards,
Roman



reply via email to

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