Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jul 2019 19:27:54 +0000
From:      bugzilla-noreply@freebsd.org
To:        threads@FreeBSD.org
Subject:   [Bug 239475] Linking libthr with -nodefaultlibs statically can cause infinite recursion
Message-ID:  <bug-239475-13406-IWdpHg9SuL@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-239475-13406@https.bugs.freebsd.org/bugzilla/>
References:  <bug-239475-13406@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D239475

--- Comment #4 from commit-hook@freebsd.org ---
A commit references this bug:

Author: kib
Date: Wed Jul 31 19:27:24 UTC 2019
New revision: 350481
URL: https://svnweb.freebsd.org/changeset/base/350481

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

Changes:
  head/lib/libthr/thread/thr_attr.c
  head/lib/libthr/thread/thr_cancel.c
  head/lib/libthr/thread/thr_clean.c
  head/lib/libthr/thread/thr_cond.c
  head/lib/libthr/thread/thr_detach.c
  head/lib/libthr/thread/thr_equal.c
  head/lib/libthr/thread/thr_exit.c
  head/lib/libthr/thread/thr_fork.c
  head/lib/libthr/thread/thr_getthreadid_np.c
  head/lib/libthr/thread/thr_init.c
  head/lib/libthr/thread/thr_join.c
  head/lib/libthr/thread/thr_kill.c
  head/lib/libthr/thread/thr_main_np.c
  head/lib/libthr/thread/thr_mutex.c
  head/lib/libthr/thread/thr_mutexattr.c
  head/lib/libthr/thread/thr_once.c
  head/lib/libthr/thread/thr_private.h
  head/lib/libthr/thread/thr_rwlock.c
  head/lib/libthr/thread/thr_self.c
  head/lib/libthr/thread/thr_sig.c
  head/lib/libthr/thread/thr_spec.c

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-239475-13406-IWdpHg9SuL>