Re: [PATCH v4] test-vmstate: fix bad GTree usage, use-after-free

2023-02-28 Thread Juan Quintela
Eric Auger wrote: > According to g_tree_foreach() documentation: > "The tree may not be modified while iterating over it (you can't > add/remove items)." > > compare_trees()/diff_tree() fail to respect this rule. > Historically GLib2 used a slice allocator for the GTree APIs > which did not immedi

[PATCH v4] test-vmstate: fix bad GTree usage, use-after-free

2023-02-28 Thread Eric Auger
According to g_tree_foreach() documentation: "The tree may not be modified while iterating over it (you can't add/remove items)." compare_trees()/diff_tree() fail to respect this rule. Historically GLib2 used a slice allocator for the GTree APIs which did not immediately release the memory back to