diff --git a/cr-restore.c b/cr-restore.c index d9f074b68..5161433c0 100644 --- a/cr-restore.c +++ b/cr-restore.c @@ -2025,7 +2025,8 @@ static int sigreturn_restore(pid_t pid, CoreEntry *core) thread_args[i].futex_rla = tcore->thread_core->futex_rla; thread_args[i].futex_rla_len = tcore->thread_core->futex_rla_len; thread_args[i].has_blk_sigset = tcore->thread_core->has_blk_sigset; - thread_args[i].blk_sigset = tcore->thread_core->blk_sigset; + memcpy(&thread_args[i].blk_sigset, + &tcore->thread_core->blk_sigset, sizeof(k_rtsigset_t)); ret = prep_sched_info(&thread_args[i].sp, tcore->thread_core); if (ret) @@ -2045,7 +2046,7 @@ static int sigreturn_restore(pid_t pid, CoreEntry *core) } - task_args->t->blk_sigset = core->tc->blk_sigset; + memcpy(&task_args->t->blk_sigset, &core->tc->blk_sigset, sizeof(k_rtsigset_t)); task_args->t->has_blk_sigset = true; /* diff --git a/pie/restorer.c b/pie/restorer.c index b92b54d11..50d08e608 100644 --- a/pie/restorer.c +++ b/pie/restorer.c @@ -259,7 +259,7 @@ static int restore_thread_common(struct rt_sigframe *sigframe, } if (args->has_blk_sigset) - RT_SIGFRAME_UC(sigframe).uc_sigmask.sig[0] = args->blk_sigset; + RT_SIGFRAME_UC(sigframe).uc_sigmask = args->blk_sigset; restore_sched_info(&args->sp); if (restore_fpu(sigframe, args))