Revision 1229e46d3cfe61ee0b11f08fbbc7530af1578637 authored by Peter Maydell on 16 October 2018, 17:09:38 UTC, committed by Kevin Wolf on 05 November 2018, 14:09:54 UTC
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. There are a few places where the in-place swap function is used on something other than a packed struct field; we convert those anyway, for consistency. Patch produced with scripts/coccinelle/inplace-byteswaps.cocci. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
1 parent c317b64
File | Mode | Size |
---|---|---|
accounting.h | -rw-r--r-- | 4.4 KB |
aio-wait.h | -rw-r--r-- | 5.2 KB |
aio.h | -rw-r--r-- | 20.0 KB |
block.h | -rw-r--r-- | 28.7 KB |
block_backup.h | -rw-r--r-- | 1.0 KB |
block_int.h | -rw-r--r-- | 49.8 KB |
blockjob.h | -rw-r--r-- | 4.8 KB |
blockjob_int.h | -rw-r--r-- | 5.0 KB |
dirty-bitmap.h | -rw-r--r-- | 6.1 KB |
nbd.h | -rw-r--r-- | 12.3 KB |
nvme.h | -rw-r--r-- | 21.4 KB |
qapi.h | -rw-r--r-- | 2.0 KB |
qdict.h | -rw-r--r-- | 1.1 KB |
raw-aio.h | -rw-r--r-- | 2.6 KB |
snapshot.h | -rw-r--r-- | 4.1 KB |
thread-pool.h | -rw-r--r-- | 1.0 KB |
throttle-groups.h | -rw-r--r-- | 3.1 KB |
write-threshold.h | -rw-r--r-- | 1.6 KB |
Computing file changes ...