Re: [Qemu-block] [PATCH 0/3] block/qcow*: Don't take address of fields in packed structs

2018-11-05 Thread Peter Maydell
On 10 October 2018 at 11:55, Kevin Wolf wrote: > Am 09.10.2018 um 19:24 hat Peter Maydell geschrieben: >> 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

Re: [Qemu-block] [PATCH 0/3] block/qcow*: Don't take address of fields in packed structs

2018-10-10 Thread Kevin Wolf
Am 09.10.2018 um 19:24 hat Peter Maydell geschrieben: > 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

Re: [Qemu-block] [PATCH 0/3] block/qcow*: Don't take address of fields in packed structs

2018-10-09 Thread John Snow
On 10/09/2018 01:24 PM, Peter Maydell 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.

[Qemu-block] [PATCH 0/3] block/qcow*: Don't take address of fields in packed structs

2018-10-09 Thread Peter Maydell
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