[PATCH] Fix reporting signal mask by sigreturn on powerpc

Andreas Schwab schwab at linux-m68k.org
Mon Feb 22 23:22:13 UTC 2010


* signal.c (sys_sigreturn) [POWERPC]: Skip dummy stack frame when
locating signal context.
---
 signal.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/signal.c b/signal.c
index c1d6eb0..bf97e90 100644
--- a/signal.c
+++ b/signal.c
@@ -1329,6 +1329,12 @@ sys_sigreturn(struct tcb *tcp)
 		tcp->u_arg[0] = 0;
 		if (upeek(tcp, sizeof(unsigned long)*PT_R1, &esp) < 0)
 			return 0;
+		/* Skip dummy stack frame. */
+#ifdef __powerpc64__
+		esp += 128;
+#else
+		esp += 64;
+#endif
 		if (umove(tcp, esp, &sc) < 0)
 			return 0;
 		tcp->u_arg[0] = 1;
-- 
1.7.0


Andreas.

-- 
Andreas Schwab, schwab at linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




More information about the Strace-devel mailing list