qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v14 06/19] qmp-input: Don't consume input when c


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v14 06/19] qmp-input: Don't consume input when checking has_member
Date: Wed, 13 Apr 2016 10:43:35 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1

On 04/13/2016 10:06 AM, Markus Armbruster wrote:
> Eric Blake <address@hidden> writes:
> 
>> Commit e8316d7 mistakenly passed consume=true
> 
> in qmp_input_optional(), right?

yes

> 
>>                                               when checking if
>> an optional member was present, but the mistake was silently
>> ignored since the code happily let us extract a member more than
>> once.  Tighten up the input visitor to ensure that a member is
>> consumed exactly once.

[1] by fixing qmp_input_optional() to pass consume=false

>>  To keep the testsuite happy in the case
>> of incomplete input, we have to check whether a member exists
>> in the dictionary before trying to remove it.
> 
> Sure this is only for the testsuite's benefit?

The testsuite was the only client that failed under the tighter
semantics; but the better semantics allow later patches to further
improve the code while guaranteeing that clients remain sane.

> 
> You fix commit e8316d7's incorrect consume=true, don't you?  Recommend
> to mention that explicitly.

I thought I did, but I can add wording [1] along those lines.


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]