]> git.ipfire.org Git - thirdparty/glibc.git/commit
nptl: Check if thread is already terminated in sigcancel_handler (BZ 32782)
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 12 Mar 2025 13:59:17 +0000 (10:59 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 13 Mar 2025 12:11:13 +0000 (09:11 -0300)
commit360cce0b066f34e85e473c04cdc16e6fa426021b
treebc14d9e004fb398704a8b5a27d72fbe766461037
parentdbc5a50d12eff4cb3f782129029d04b8a76f58e7
nptl: Check if thread is already terminated in sigcancel_handler (BZ 32782)

The SIGCANCEL signal handler should not issue __syscall_do_cancel,
which calls __do_cancel and __pthread_unwind, if the cancellation
is already in proces (and libgcc unwind is not reentrant).  Any
cancellation signal received after is ignored.

Checked on x86_64-linux-gnu and aarch64-linux-gnu.

Tested-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
benchtests/tanh-inputs
nptl/pthread_cancel.c
sysdeps/pthread/Makefile
sysdeps/pthread/tst-cancel32.c [new file with mode: 0644]