[Top][All Lists]

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

Re: [qemu-s390x] [PATCH] hw/s390x/virtio-ccw.c: Don't take address of fi

From: Cornelia Huck
Subject: Re: [qemu-s390x] [PATCH] hw/s390x/virtio-ccw.c: Don't take address of fields in packed structs
Date: Mon, 10 Dec 2018 16:22:19 +0100

On Mon, 10 Dec 2018 12:04:36 +0000
Peter Maydell <address@hidden> wrote:

> Taking the address of a field in a packed struct is a bad idea, because
> it might not be actually aligned enough for that pointer type (and
> thus cause a crash on dereference on some host architectures). Newer
> versions of clang warn about this. Avoid the bug by not using the
> "modify in place" byte swapping functions.
> Patch produced with scripts/coccinelle/inplace-byteswaps.cocci
> (with a couple of long lines manually wrapped).
> Signed-off-by: Peter Maydell <address@hidden>

Thanks, applied.

reply via email to

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