]> git.proxmox.com Git - mirror_qemu.git/commit
tcg: Avoid undefined behaviour patching code at unaligned addresses
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 28 Mar 2014 15:29:48 +0000 (15:29 +0000)
committerRichard Henderson <rth@twiddle.net>
Mon, 12 May 2014 17:03:04 +0000 (10:03 -0700)
commit5c53bb812152c3d7919cadfd47c210b181bf89ac
tree1e6de84b05aa30c933b709bfb6097dc45b6044d0
parent4387345a962284c77435a9644d528d2356adecc5
tcg: Avoid undefined behaviour patching code at unaligned addresses

To avoid C undefined behaviour when patching generated code,
provide wrappers tcg_patch8/16/32/64 which use the usual memcpy
trick, and use them in the i386 backend.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg/i386/tcg-target.c
tcg/tcg.c