]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Avoid conflicts with libc symbols in libthr jump table.
authorkib <kib@FreeBSD.org>
Wed, 31 Jul 2019 20:04:39 +0000 (20:04 +0000)
committerkib <kib@FreeBSD.org>
Wed, 31 Jul 2019 20:04:39 +0000 (20:04 +0000)
commit5535e10579a101147c4b112b29654caa1ca400af
treeaccec7541de7195bc57a7e80ad2bb1013eacf4d1
parent9be2af0190b651def0260a196c36a228d55a4864
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