HomeFreeBSD

libthr: prevent setcontext() from masking SIGTHR

Description

libthr: prevent setcontext() from masking SIGTHR

__thr_setcontext() mistakenly tested for the presence of SIGCANCEL
in its local ucontext_t instead of the parameter. Therefore,
if a thread calls setcontext() with a context whose signal mask
contains SIGTHR (a.k.a. SIGCANCEL), that signal will be blocked,
preventing the thread from being cancelled or suspended.

Reported by: gcc 6.1 via RISC-V tinderbox
Reviewed by: kib
MFC after: 3 days
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D10933

Details

Provenance
vangyzenAuthored on
Reviewer
kib
Differential Revision
D10933: libthr: prevent setcontext() from masking SIGTHR
Parents
rS318951: makefs: add -O (offset) option
Branches
Unknown
Tags
Unknown