[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 5/5] block: extend block-commit to accept a stri

From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 5/5] block: extend block-commit to accept a string for the backing file
Date: Thu, 15 May 2014 07:14:09 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 05/15/2014 07:10 AM, Jeff Cody wrote:

>> We are moving towards having qapi guarantee sane defaults for FOO when
>> has_FOO is false; but aren't there yet.  You are correct that this needs
>> to guarantee that we aren't passing random memory.
> The QAPI code generator for the QMP input marshaller initializes all
> pointers to NULL, and all bools to false.  If has_ is false, then the
> associated pointer will also be NULL, so it is safe to just pass
> backing_file.

It didn't used to, and we still haven't documented that as being a
reliable guarantee, nor does the testsuite cover that.  It's still safer
to not rely on that fact until we make it part of the contract of qapi.

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]