Fix do_rt_sigreturn on m68k linux userspace emulation
PATCH 1/1 Fix do_rt_sigreturn on m68k linux userspace emulation
do_rt_sigreturn forgets to initialize the signal mask variable before trying to use it to restore the mask, so the signal mask is undefined after do_rt_sigreturn. This bug has been in all the time since 7181155d when do_rt_sigreturn was implemented for m68k.
--- linux-user/signal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
linux-user/signal.c +4 -1
@@ -5260,11 +5260,14 @@ long do_rt_sigreturn(CPUM68KState *env)abi_ulong frame_addr = env->aregs[7 ] -4 ;target_sigset_t target_set;sigset_t set; -int d0; +int d0, i;if (!lock_user_struct (VERIFY_READ , frame, frame_addr,1 )) goto badframe; +for (i =0 ; i <TARGET_NSIG_WORDS ; i++) { + target_set.sig[i] = frame->uc.tuc_sigmask.sig[i]; + }target_to_host_sigset_internal (&set, &target_set);do_sigprocmask (SIG_SETMASK , &set,NULL );
Signature · 1 line
2.1.4