From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtOoc-0003T1-8m for qemu-devel@nongnu.org; Mon, 02 Nov 2015 18:47:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtOob-0000u6-DD for qemu-devel@nongnu.org; Mon, 02 Nov 2015 18:47:06 -0500 References: <1446507126-28603-1-git-send-email-jsnow@redhat.com> From: Eric Blake Message-ID: <5637F5F2.4050202@redhat.com> Date: Mon, 2 Nov 2015 16:46:58 -0700 MIME-Version: 1.0 In-Reply-To: <1446507126-28603-1-git-send-email-jsnow@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="k8QdL7GNmiGOq6KEnvT1UCwLtja1q9l7X" Subject: Re: [Qemu-devel] [PATCH] qcow2: avoid misaligned 64bit bswap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow , qemu-block@nongnu.org Cc: kwolf@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --k8QdL7GNmiGOq6KEnvT1UCwLtja1q9l7X Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > Spotted with clang -fsanitize=3Dundefined and observed in iotests 15, 2= 6, > 44, 115 and 121. >=20 > Signed-off-by: John Snow > --- > block/qcow2-refcount.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --k8QdL7GNmiGOq6KEnvT1UCwLtja1q9l7X Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWN/XyAAoJEKeha0olJ0NqZI8H/jUJj7q5Ns08Gp1rKkn6GGAp 1xpsXfo0jN+d+I9uOfBjfyFINa1CHeAGM+2O0+hpbMcgezRXb4qaIk9lSE52oNOY 4ArX+4tL7grsO7kQsQdYi6rZQ+NNK7lfdqA6iwbjjax0ZWuHiB6bW4Lre6b+vIVg okduTDQkQVwR/cnKEjkaoT14V5rnQN3AT/2Dr4MQ2kva9tnF/iwKnCLZYVzWST+r ypQdfiUc0Zzqr95YDKrqPDyw8CYXSSqEAWcUTtUx+xk+LetDTiEtsBxBPaSOu3eL I8NsZdhzF5Ljyh5j6v6PiLpOCb+6huHJsa7rVidO3jqJcIzo3oDLne3+64v4mA4= =c2vY -----END PGP SIGNATURE----- --k8QdL7GNmiGOq6KEnvT1UCwLtja1q9l7X--