On Fri, 18 Feb 2022 at 17:39, Damien Hedde <damien.he...@greensocs.com> wrote: > You're right. I was confused when re-writing the message. > This leaks happen on > init -> realize-failure -> finalize > Because the array is allocated, then every cpu is initialized (and an > error failure may happen for any of them).
"Failure during realize" is one of those cases I don't think we handle very well. I'd like to see a view by one of our QOM experts on what the best way to handle this is -- should one do the cleanup in realize itself, or in instance_finalize? Do the sub-objects that are being initialized and realized need to be manually cleaned up in the realize-is-failing case, or is that part automatic? Which is to say that maybe this patch is the best way to do this, but it would be nice to be sure about that... thanks -- PMM