freebsd-skq/lib/libthr/thread
jhb 995b92da50 Ensure thread library is initialized in pthread_testcancel().
Call _thr_check_init() before reading curthread in pthread_testcancel().

If a constructor in a library creates a semaphore via sem_init() and
then waits for it via sem_wait(), the program can core dump in
_pthread_testcancel() called from sem_wait().  This is because the
semaphore implementation lives in libc, so the library's constructors
can be run before libthr's constructors.

Reported by:	arichardson
Reviewed by:	kib
Obtained from:	CheriBSD
MFC after:	1 week
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D14786
2018-03-21 21:13:26 +00:00
..
Makefile.inc
thr_affinity.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_attr.c
thr_autoinit.c
thr_barrier.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_barrierattr.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_cancel.c Ensure thread library is initialized in pthread_testcancel(). 2018-03-21 21:13:26 +00:00
thr_clean.c
thr_concurrency.c
thr_cond.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_condattr.c
thr_create.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_ctrdtr.c
thr_detach.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_equal.c
thr_event.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_exit.c
thr_fork.c
thr_getcpuclockid.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_getprio.c
thr_getschedparam.c
thr_getthreadid_np.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_info.c
thr_init.c
thr_join.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_kern.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_kill.c
thr_list.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_main_np.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_multi_np.c
thr_mutex.c
thr_mutexattr.c
thr_once.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_printf.c libthr: Fix missing break in switch. 2018-01-27 22:27:55 +00:00
thr_private.h lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_pshared.c
thr_pspinlock.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_resume_np.c
thr_rtld.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_rwlock.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_rwlockattr.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_self.c
thr_sem.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_setprio.c
thr_setschedparam.c
thr_sig.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_single_np.c
thr_sleepq.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_spec.c
thr_spinlock.c
thr_stack.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_suspend_np.c
thr_switch_np.c
thr_symbols.c
thr_syscalls.c
thr_umtx.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_umtx.h lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
thr_yield.c