On Mon, Sep 21, 2026 at 12:35:09PM +0100, Mark Cave-Ayland wrote: > This is eventually intended to be a replacement for > object_property_add_alias() > which uses an object property instead of a class property. > > With the advent of class properties, it is possible that QOM may attempt to > set or retrieve the value of an unset alias property. Update the existing > property_get_alias() function to use the null visitor if the alias target has > not been set, property_set_alias() to return an error, and > property_resolve_alias() to return NULL for the same case. > > This ensures that unset class alias properties accessed e.g. via the monitor > do > not cause QEMU to crash. > > Signed-off-by: Mark Cave-Ayland <[email protected]> > --- > include/qom/object.h | 25 ++++++++++++ > qom/object.c | 97 ++++++++++++++++++++++++++++++++++++++------ > 2 files changed, 110 insertions(+), 12 deletions(-)
Reviewed-by: Daniel P. Berrangé <[email protected]> With regards, Daniel -- |: https://berrange.com ~~ https://hachyderm.io/@berrange :| |: https://libvirt.org ~~ https://entangle-photo.org :| |: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
