Re: [Qemu-devel] [PATCH v6 05/23] qmp: Fix reference-counting of qnull on empty output visit

2015-12-03 Thread Eric Blake
On 12/03/2015 10:50 AM, Markus Armbruster wrote: >>> So, how does this contraption work? >>> >>> A visitor cab encounter NULL only when it visits pointers (d'oh!). >>> Searching qapi-visit-core.c for **obj finds start_struct(), >>> start_implicit_struct(), type_str(), type_any(). >>> >>> As far as

Re: [Qemu-devel] [PATCH v6 05/23] qmp: Fix reference-counting of qnull on empty output visit

2015-12-03 Thread Markus Armbruster
Eric Blake writes: > On 11/27/2015 06:06 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Commit 6c2f9a15 ensured that we would not return NULL when the >>> caller used an output visitor but had nothing to visit. But >>> in doing so, it added a FIXME about a reference count leak >>> th

Re: [Qemu-devel] [PATCH v6 05/23] qmp: Fix reference-counting of qnull on empty output visit

2015-12-02 Thread Eric Blake
On 11/27/2015 06:06 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Commit 6c2f9a15 ensured that we would not return NULL when the >> caller used an output visitor but had nothing to visit. But >> in doing so, it added a FIXME about a reference count leak >> that could abort qemu in the (u

Re: [Qemu-devel] [PATCH v6 05/23] qmp: Fix reference-counting of qnull on empty output visit

2015-11-27 Thread Markus Armbruster
Eric Blake writes: > Commit 6c2f9a15 ensured that we would not return NULL when the > caller used an output visitor but had nothing to visit. But > in doing so, it added a FIXME about a reference count leak > that could abort qemu in the (unlikely) case of SIZE_MAX such > visits (more plausible o

[Qemu-devel] [PATCH v6 05/23] qmp: Fix reference-counting of qnull on empty output visit

2015-11-25 Thread Eric Blake
Commit 6c2f9a15 ensured that we would not return NULL when the caller used an output visitor but had nothing to visit. But in doing so, it added a FIXME about a reference count leak that could abort qemu in the (unlikely) case of SIZE_MAX such visits (more plausible on 32-bit). This fixes things b