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 |
---|---|---|
user | ||
address-spaces.h | -rw-r--r-- | 933 bytes |
cpu-all.h | -rw-r--r-- | 11.0 KB |
cpu-common.h | -rw-r--r-- | 4.1 KB |
cpu-defs.h | -rw-r--r-- | 7.3 KB |
cpu_ldst.h | -rw-r--r-- | 11.1 KB |
cpu_ldst_template.h | -rw-r--r-- | 5.7 KB |
cpu_ldst_useronly_template.h | -rw-r--r-- | 3.8 KB |
cputlb.h | -rw-r--r-- | 997 bytes |
exec-all.h | -rw-r--r-- | 18.6 KB |
gdbstub.h | -rw-r--r-- | 4.0 KB |
gen-icount.h | -rw-r--r-- | 2.0 KB |
helper-gen.h | -rw-r--r-- | 3.9 KB |
helper-head.h | -rw-r--r-- | 4.5 KB |
helper-proto.h | -rw-r--r-- | 1.5 KB |
helper-tcg.h | -rw-r--r-- | 2.2 KB |
hwaddr.h | -rw-r--r-- | 458 bytes |
ioport.h | -rw-r--r-- | 2.3 KB |
log.h | -rw-r--r-- | 1.3 KB |
memattrs.h | -rw-r--r-- | 2.0 KB |
memory-internal.h | -rw-r--r-- | 4.0 KB |
memory.h | -rw-r--r-- | 78.5 KB |
memory_ldst.inc.h | -rw-r--r-- | 3.4 KB |
memory_ldst_cached.inc.h | -rw-r--r-- | 3.6 KB |
memory_ldst_phys.inc.h | -rw-r--r-- | 5.0 KB |
poison.h | -rw-r--r-- | 2.8 KB |
ram_addr.h | -rw-r--r-- | 15.6 KB |
ramlist.h | -rw-r--r-- | 2.8 KB |
semihost.h | -rw-r--r-- | 1.5 KB |
softmmu-semi.h | -rw-r--r-- | 2.8 KB |
target_page.h | -rw-r--r-- | 500 bytes |
tb-context.h | -rw-r--r-- | 1.2 KB |
tb-hash-xx.h | -rw-r--r-- | 3.0 KB |
tb-hash.h | -rw-r--r-- | 2.2 KB |
tb-lookup.h | -rw-r--r-- | 1.3 KB |
translator.h | -rw-r--r-- | 4.5 KB |
Computing file changes ...