svn commit: r350483 - head/lib/libthr/thread

Konstantin Belousov kib at FreeBSD.org
Wed Jul 31 20:04:40 UTC 2019


Author: kib
Date: Wed Jul 31 20:04:39 2019
New Revision: 350483
URL: https://svnweb.freebsd.org/changeset/base/350483

Log:
  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

Modified:
  head/lib/libthr/thread/thr_private.h

Modified: head/lib/libthr/thread/thr_private.h
==============================================================================
--- head/lib/libthr/thread/thr_private.h	Wed Jul 31 19:32:39 2019	(r350482)
+++ head/lib/libthr/thread/thr_private.h	Wed Jul 31 20:04:39 2019	(r350483)
@@ -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));


More information about the svn-src-all mailing list