Fix reporting signal mask by sigreturn on powerpc

* signal.c (sys_sigreturn) [POWERPC]: Skip dummy stack frame when
locating signal context.
This commit is contained in:
Andreas Schwab 2010-02-23 00:18:51 +01:00
parent 200370419b
commit edb393420c

View File

@ -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;