[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2] linux-user: Use correct offset of tuc_stack in A
From: |
Timothy E Baldwin |
Subject: |
[Qemu-devel] [PATCH v2] linux-user: Use correct offset of tuc_stack in ARM do_sigframe_return_v2 |
Date: |
Sun, 4 Sep 2016 00:40:30 +0100 |
struct target_ucontext_v2 is not at the begining of the signal frame,
therefore do_sigaltstack was being passed bogus arguments.
Signed-off-by: Timothy Edward Baldwin <address@hidden>
---
linux-user/signal.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Changes since v1: Fix style.
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 9a4d894..f6cb5ee 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -2062,8 +2062,11 @@ static int do_sigframe_return_v2(CPUARMState *env,
target_ulong frame_addr,
}
}
- if (do_sigaltstack(frame_addr + offsetof(struct target_ucontext_v2,
tuc_stack), 0, get_sp_from_cpustate(env)) == -EFAULT)
+ if (do_sigaltstack(frame_addr
+ + offsetof(struct rt_sigframe_v2, uc.tuc_stack),
+ 0, get_sp_from_cpustate(env)) == -EFAULT) {
return 1;
+ }
#if 0
/* Send SIGTRAP if we're single-stepping */
--
2.1.4
- [Qemu-devel] [PATCH v2] linux-user: Use correct offset of tuc_stack in ARM do_sigframe_return_v2,
Timothy E Baldwin <=