virtio-balloon crashes in a object assert when querying stats
Host environment
- Operating system: Fedora 41
- OS/kernel version: 6.11.8-300.fc41.x86_64
- Architecture: x86_64
- QEMU flavor: All system emulators with virtio-balloon
- QEMU version: v9.2.0-rc2-34-g72b88908d1
- QEMU command line:
./qemu-system-x86_64 -device virtio-balloon,id=balloon -qmp qmp.sock
Emulated/Virtualized environment
- Operating system: Any
- Architecture: All
Description of problem
Fetch virtio-balloon stats will crash a QEMU crash with assert failures
Steps to reproduce
- ./qemu-system-x86_64 -device virtio-balloon,id=balloon -qmp qmp.sock
- Connect to qmp.sock
- Issue 'qom-get path=/machine/peripheral/balloon property=guest-stats'
- QEMU go boom!
Additional information
This is a regression caused by commit 0d2eeef7, which failed to update balloon_stat_names
with the new stats names, causing code to try to add a QDict entry with a NULL key.