]> git.ipfire.org Git - thirdparty/qemu.git/commit
linux-user: Fix broken m68k signal handling on 64 bit hosts
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 22 Dec 2014 17:47:00 +0000 (17:47 +0000)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 23 Feb 2015 00:09:36 +0000 (18:09 -0600)
commit09e2753be0e7841ae0045a87ee974e47ba10befd
tree0fe68342bd04b0663a34b13cdc51f52a59590eaa
parent49725cdf045e3bb7b6f5ae5d6c1331fdcc034d64
linux-user: Fix broken m68k signal handling on 64 bit hosts

The m68k signal frame setup code which writes the signal return
trampoline code to the stack was assuming that a 'long' was 32 bits;
on 64 bit systems this meant we would end up writing the 32 bit
(2 insn) trampoline sequence to retaddr+4,retaddr+6 instead of
the intended retaddr+0,retaddr+2, resulting in a guest crash when
it tried to execute the invalid zero-bytes at retaddr+0.
Fix by using uint32_t instead; also use uint16_t rather than short
for consistency. This fixes bug LP:1404690.

Reported-by: Michel Boaventura
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
(cherry picked from commit 1669add752d9f29283f8ebf6a863d7b1e2d0f146)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
linux-user/signal.c