[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qcow2: avoid misaligned 64bit bswap
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH] qcow2: avoid misaligned 64bit bswap |
Date: |
Wed, 4 Nov 2015 12:08:02 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 03.11.2015 um 00:46 hat Eric Blake geschrieben:
> 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>
Thanks, applied to the block branch.
Kevin
pgpH6tjbSEehg.pgp
Description: PGP signature