Re: [Qemu-devel] [PATCH] hw/s390/ccw.c: Don't take address of packed members

2018-12-13 Thread Cornelia Huck
On Wed, 12 Dec 2018 21:15:29 + Peter Maydell wrote: > On Wed, 12 Dec 2018 at 17:34, Cornelia Huck wrote: > > > > On Mon, 10 Dec 2018 14:23:15 + > > Peter Maydell wrote: > > > > > On Mon, 10 Dec 2018 at 14:13, Cornelia Huck wrote: > > > > > > > > On Mon, 10 Dec 2018 13:58:03 + >

Re: [Qemu-devel] [PATCH] hw/s390/ccw.c: Don't take address of packed members

2018-12-12 Thread Peter Maydell
On Wed, 12 Dec 2018 at 17:34, Cornelia Huck wrote: > > On Mon, 10 Dec 2018 14:23:15 + > Peter Maydell wrote: > > > On Mon, 10 Dec 2018 at 14:13, Cornelia Huck wrote: > > > > > > On Mon, 10 Dec 2018 13:58:03 + > > > Peter Maydell wrote: > > > > > > > Taking the address of a field in a pa

Re: [Qemu-devel] [PATCH] hw/s390/ccw.c: Don't take address of packed members

2018-12-12 Thread Cornelia Huck
On Mon, 10 Dec 2018 14:23:15 + Peter Maydell wrote: > On Mon, 10 Dec 2018 at 14:13, Cornelia Huck wrote: > > > > On Mon, 10 Dec 2018 13:58:03 + > > Peter Maydell wrote: > > > > > Taking the address of a field in a packed struct is a bad idea, because > > > it might not be actually ali

Re: [Qemu-devel] [PATCH] hw/s390/ccw.c: Don't take address of packed members

2018-12-10 Thread Farhan Ali
On 12/10/2018 08:58 AM, 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. Avoid

Re: [Qemu-devel] [PATCH] hw/s390/ccw.c: Don't take address of packed members

2018-12-10 Thread Peter Maydell
On Mon, 10 Dec 2018 at 14:13, Cornelia Huck wrote: > > On Mon, 10 Dec 2018 13:58:03 + > 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 dereferen

Re: [Qemu-devel] [PATCH] hw/s390/ccw.c: Don't take address of packed members

2018-12-10 Thread Cornelia Huck
On Mon, 10 Dec 2018 13:58:03 + 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 ab

[Qemu-devel] [PATCH] hw/s390/ccw.c: Don't take address of packed members

2018-12-10 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 problem by using local copies of the PMCW and