From: Chen Gang <gang.chen.5...@gmail.com> For target m68k, setup_rt_frame() and do_rt_sigreturn() have this issue.
Signed-off-by: Chen Gang <gang.chen.5...@gmail.com> --- linux-user/signal.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index cead97b..0265c46 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -5160,7 +5160,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, frame_addr = get_sigframe(ka, env, sizeof *frame); if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 0)) - goto give_sigsegv; + goto err; __put_user(sig, &frame->sig); @@ -5215,6 +5215,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, give_sigsegv: unlock_user_struct(frame, frame_addr, 1); +err: force_sig(TARGET_SIGSEGV); } @@ -5261,7 +5262,7 @@ long do_rt_sigreturn(CPUM68KState *env) int d0; if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1)) - goto badframe; + goto err; target_to_host_sigset_internal(&set, &target_set); do_sigprocmask(SIG_SETMASK, &set, NULL); @@ -5281,6 +5282,7 @@ long do_rt_sigreturn(CPUM68KState *env) badframe: unlock_user_struct(frame, frame_addr, 0); +err: force_sig(TARGET_SIGSEGV); return 0; } -- 1.9.3