From: Chen Gang <cheng...@emindsoft.com.cn>

The restorer needs the return code address which is frame->retcode, not
frame itself.

Signed-off-by: Chen Gang <gang.chen.5...@gmail.com>
---
 linux-user/signal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux-user/signal.c b/linux-user/signal.c
index e487f9e..4157154 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -5455,7 +5455,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_rt_sigframe, retcode);
     }
 
     if (err) {
-- 
1.9.3


Reply via email to