From: Laurent Vivier Date: Sun, 1 Apr 2018 20:46:53 +0000 (+0200) Subject: linux-user: fix alpha signal emulation X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=95a29a4e3edb3eabde37587b2bcc9d4874c5306f;p=qemu.git linux-user: fix alpha signal emulation setup_frame() doesn't set correctly the address of the trampoline code. The offset of retcode array must be added to the stack frame address. Signed-off-by: Laurent Vivier Message-Id: <20180401204653.14211-1-laurent@vivier.eu> --- diff --git a/linux-user/signal.c b/linux-user/signal.c index 2ea3e0321f..9399f0ec47 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -6367,7 +6367,7 @@ static void setup_frame(int sig, struct target_sigaction *ka, &frame->retcode[1]); __put_user(INSN_CALLSYS, &frame->retcode[2]); /* imb() */ - r26 = frame_addr; + r26 = frame_addr + offsetof(struct target_sigframe, retcode); } unlock_user_struct(frame, frame_addr, 1); @@ -6424,7 +6424,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, &frame->retcode[1]); __put_user(INSN_CALLSYS, &frame->retcode[2]); /* imb(); */ - r26 = frame_addr; + r26 = frame_addr + offsetof(struct target_sigframe, retcode); } if (err) {