glibc/sysdeps/pthread
Florian Weimer 526c3cf11e nptl: Fix race between pthread_kill and thread exit (bug 12889)
A new thread exit lock and flag are introduced.  They are used to
detect that the thread is about to exit or has exited in
__pthread_kill_internal, and the signal is not sent in this case.

The test sysdeps/pthread/tst-pthread_cancel-select-loop.c is derived
from a downstream test originally written by Marek Polacek.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-09-13 11:06:08 +02:00
..
bits
Makeconfig
Makefile nptl: Fix race between pthread_kill and thread exit (bug 12889) 2021-09-13 11:06:08 +02:00
allocalim.h
call_once.c
cnd_broadcast.c
cnd_destroy.c
cnd_init.c
cnd_signal.c
cnd_timedwait.c
cnd_wait.c
eintr.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
elision-conf.h
mtx_destroy.c
mtx_init.c
mtx_lock.c
mtx_timedlock.c
mtx_trylock.c
mtx_unlock.c
posix-timer.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
pthread_atfork.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
pthread_atfork_compat.c
pthread_early_init.h
pthread_mutex_conf.h
sem_close.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
sem_open.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
sem_routines.c
sem_routines.h
sem_unlink.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
semaphore.h
thrd_create.c
thrd_detach.c
thrd_equal.c
thrd_exit.c
thrd_join.c
thrd_priv.h
thrd_sleep.c
threads.h
tss_create.c
tss_delete.c
tss_get.c
tss_set.c
tst-_res1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-_res1mod1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-_res1mod2.c
tst-abstime-time64.c
tst-abstime.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-atfork1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-atfork2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-atfork2mod.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-attr1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-backtrace1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-bad-schedattr.c
tst-barrier1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-barrier2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-barrier3.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-barrier4.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-basic1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-basic2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-basic3.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-basic4.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-basic5.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-basic6.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-basic7.c
tst-call-once.c
tst-cancel-self-cancelstate.c
tst-cancel-self-canceltype.c
tst-cancel-self-cleanup.c
tst-cancel-self-testcancel.c
tst-cancel-self.c
tst-cancel1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cancel2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cancel3.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cancel4-common.c
tst-cancel4-common.h
tst-cancel4.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cancel5.c
tst-cancel6.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cancel8.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cancel9.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cancel10.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cancel11.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cancel12.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cancel13.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cancel14.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cancel15.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cancel16.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cancel18.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cancel19.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cancel20.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cancel21-static.c
tst-cancel21.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cancel22.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cancel23.c
tst-cancel25.c
tst-cancel26.c
tst-cancel27.c
tst-cancel28.c
tst-cancelx1.c
tst-cancelx2.c
tst-cancelx3.c
tst-cancelx4.c
tst-cancelx5.c
tst-cancelx6.c
tst-cancelx8.c
tst-cancelx9.c
tst-cancelx10.c
tst-cancelx11.c
tst-cancelx12.c
tst-cancelx13.c
tst-cancelx14.c
tst-cancelx15.c
tst-cancelx16.c
tst-cancelx18.c
tst-cancelx20.c
tst-cancelx21.c
tst-cleanup0.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cleanup0.expect
tst-cleanup1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cleanup2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cleanup3.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cleanupx0.c
tst-cleanupx0.expect
tst-cleanupx1.c
tst-cleanupx2.c
tst-cleanupx3.c
tst-clock1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cnd-basic.c
tst-cnd-broadcast.c
tst-cnd-timedwait-time64.c
tst-cnd-timedwait.c
tst-cond-except.c
tst-cond1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cond2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cond3.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cond4.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cond5.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cond6.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cond7.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cond8-static.c
tst-cond8.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cond9.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cond10.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cond11-static.c
tst-cond11-time64.c
tst-cond11.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cond12.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cond13.c
tst-cond14.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cond15.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cond16.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cond17.c
tst-cond18.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cond19.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cond20.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cond21.c
tst-cond23.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-cond24.c
tst-cond25.c
tst-cond27.c
tst-create-detached.c
tst-detach1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-eintr2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-eintr3.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-eintr4.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-eintr5.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-exec1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-exec2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-exec3.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-exit1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-exit2.c
tst-exit3.c
tst-fini1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-fini1mod.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-flock1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-flock2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-fork1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-fork2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-fork3.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-fork4.c
tst-getpid3.c
tst-join1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-join2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-join3.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-join4.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-join5.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-join6.c
tst-join7.c
tst-join7mod.c
tst-join8.c
tst-join9.c
tst-join10.c
tst-join11.c
tst-join12.c
tst-join13.c
tst-join14-time64.c
tst-join14.c
tst-join15.c
tst-key1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-key2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-key3.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-key4.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-kill1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-kill2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-kill3.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-kill5.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-kill6.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-locale1.c
tst-locale2.c
tst-memstream.c
tst-mtx-basic.c
tst-mtx-recursive.c
tst-mtx-timedlock-time64.c
tst-mtx-timedlock.c
tst-mtx-trylock.c
tst-mutex-errorcheck.c
tst-mutex1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-mutex2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-mutex3.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-mutex4.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-mutex5.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-mutex6.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-mutex7.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-mutex7robust.c
tst-mutex9.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-mutex10.c
tst-mutex11.c
tst-once1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-once2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-once3.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-once4.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-oncex3.c
tst-oncex4.c
tst-oncey3.c
tst-oncey4.c
tst-pt-align.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-pt-align3.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-pt-popen1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-pt-sysconf.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-pt-tls1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-pt-tls2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-pt-tls4.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-pt-vfork1.c
tst-pt-vfork2.c
tst-pthread-mutexattr.c
tst-pthread_cancel-exited.c nptl: pthread_kill, pthread_cancel should not fail after exit (bug 19193) 2021-09-13 11:06:08 +02:00
tst-pthread_cancel-select-loop.c nptl: Fix race between pthread_kill and thread exit (bug 12889) 2021-09-13 11:06:08 +02:00
tst-pthread_kill-exited.c nptl: pthread_kill, pthread_cancel should not fail after exit (bug 19193) 2021-09-13 11:06:08 +02:00
tst-pthread_kill-exiting.c nptl: Fix race between pthread_kill and thread exit (bug 12889) 2021-09-13 11:06:08 +02:00
tst-raise1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-robust1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-robust2.c
tst-robust3.c
tst-robust4.c
tst-robust5.c
tst-robust6.c
tst-robust7.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-robust8.c
tst-robust9.c
tst-robust10.c
tst-rwlock-tryrdlock-stall.c
tst-rwlock-trywrlock-stall.c
tst-rwlock1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-rwlock4.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-rwlock5.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-rwlock12.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-rwlock13.c
tst-rwlock14-time64.c
tst-rwlock14.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-rwlock16.c
tst-sem1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-sem2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-sem3.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-sem4.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-sem5-time64.c
tst-sem5.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-sem6.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-sem7.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-sem8.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-sem9.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-sem10.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-sem14.c
tst-sem15.c
tst-sem16.c
tst-setuid3.c
tst-signal1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-signal2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-signal4.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-signal5.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-signal6.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-signal8.c
tst-spin1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-spin2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-spin3.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-spin4.c
tst-stack1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-stdio1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-stdio2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-thrd-detach.c
tst-thrd-sleep-time64.c
tst-thrd-sleep.c
tst-timer.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-tls4moda.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-tls4modb.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-tsd1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-tsd2.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-tsd5.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-tsd6.c
tst-tss-basic.c
tst-umask1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-unload.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-unwind-thread.c
tst-vfork1x.c
tst-vfork2x.c