[Bug 239550] std::thread::id uses pthread_equal in undefined ways not handled by _pthread_stubs

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Aug 20 17:40:01 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239550

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

Author: dim
Date: Tue Aug 20 17:39:34 UTC 2019
New revision: 351253
URL: https://svnweb.freebsd.org/changeset/base/351253

Log:
  Pull in r368867 from upstream libc++ trunk (by Marshall Clow):

    Rework recursive_timed_mutex so that it uses __thread_id instead of
    using the lower-level __libcpp_thread_id. This is prep for fixing
    PR42918. Reviewed as https://reviews.llvm.org/D65895

  Pull in r368916 from upstream libc++ trunk (by Marshall Clow):

    Fix thread comparison by making sure we never pass our special 'not a
    thread' value to the underlying implementation. Fixes PR#42918.

  This should fix std::thread::id::operator==() attempting to call
  pthread_equal(3) with zero values.

  Reported by:  andrew at tao11.riddles.org.uk
  PR:           239038, 239550
  MFC after:    3 days

Changes:
  head/contrib/libc++/include/__threading_support
  head/contrib/libc++/include/mutex
  head/contrib/libc++/include/thread
  head/contrib/libc++/src/mutex.cpp

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


More information about the freebsd-threads mailing list