From 3638455c92650b92741626ba50960567e02a763f Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Wed, 31 Jul 2019 20:04:39 +0000 Subject: [PATCH] Avoid conflicts with libc symbols in libthr jump table. In some corner cases of static linking and unexpected libraries order on the linker command line, libc symbol might preempt the same libthr symbol, in which case libthr jump table points back to libc causing either infinite recursion or loop. Handle all of such symbols by using private libthr names for them, ensuring that the right pointers are installed into the table. In collaboration with: arichardson PR: 239475 Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D21088 --- lib/libthr/thread/thr_private.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index 03985721384b..5bbe05a6a4e9 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -1021,8 +1021,6 @@ void __thr_cleanup_push_imp(void (*)(void *), void *, void __thr_cleanup_pop_imp(int); void _thr_cleanup_push(void (*)(void *), void *); void _thr_cleanup_pop(int); -void _thr_cancel_enter(struct pthread *); -void _thr_cancel_leave(struct pthread *, int); void _Tthr_testcancel(void); int _thr_cancel(pthread_t); int _thr_atfork(void (*)(void), void (*)(void), void (*)(void));