[Top][All Lists]

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

Re: [Qemu-block] [Qemu-devel] [PATCH] qcow2: avoid misaligned 64bit bswa

From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH] qcow2: avoid misaligned 64bit bswap
Date: Mon, 2 Nov 2015 16:46:58 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 11/02/2015 04:32 PM, John Snow wrote:
> If we create a buffer directly on the stack by using 12 bytes, there's
> no guarantee the 64bit value we want to swap will be aligned, which
> could cause errors with undefined behavior.
> Spotted with clang -fsanitize=undefined and observed in iotests 15, 26,
> 44, 115 and 121.
> Signed-off-by: John Snow <address@hidden>
> ---
>  block/qcow2-refcount.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)

Reviewed-by: Eric Blake <address@hidden>

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]