Re: [PATCH v2 07/10] qdev: Abort if the root machine container is missing

2020-01-21 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > The QEMU device API (qdev) relies on having the '/machine' > container always available. > > If it is missing, QEMU will later crash dereferencing a NULL > pointer, we will get a SEGV, open a debugger, look at the > backtrace, and figure out we messed with QOM. >

[PATCH v2 07/10] qdev: Abort if the root machine container is missing

2020-01-21 Thread Philippe Mathieu-Daudé
The QEMU device API (qdev) relies on having the '/machine' container always available. If it is missing, QEMU will later crash dereferencing a NULL pointer, we will get a SEGV, open a debugger, look at the backtrace, and figure out we messed with QOM. Or we can use g_assert() which abort, displayi