On 06/03/20 12:04 +0000, Jonathan Wakely wrote:
When the target doesn't define PTHREAD_RWLOCK_INITIALIZER we use a
wrapper around pthread_wrlock_init, but the wrapper only takes one
argument and we try to call it with two.
This went unnnoticed on most targets because they do define the
PTHREAD_RWLOCK_INITIALIZER macro, but it causes a bootstrap failure on
darwin8.
PR libstdc++/93244
* include/std/shared_mutex [!PTHREAD_RWLOCK_INITIALIZER]
(__shared_mutex_pthread::__shared_mutex_pthread()): Remove incorrect
second argument to __glibcxx_rwlock_init.
* testsuite/30_threads/shared_timed_mutex/94069.cc: New test.
Tested powerpc64le-linux, committed to master.
This also needs to be backported to gcc-9 but I'll let the release
managers decide whether that's before or after the upcoming 9.3
release.
commit b0815713a32c5cc062bd41fa75dac4d4408215fb
Author: Jonathan Wakely <jwak...@redhat.com>
Date: Fri Mar 6 12:03:17 2020 +0000
libstdc++: Fix call to __glibcxx_rwlock_init (PR 93244)
When the target doesn't define PTHREAD_RWLOCK_INITIALIZER we use a
wrapper around pthread_wrlock_init, but the wrapper only takes one
argument and we try to call it with two.
This went unnnoticed on most targets because they do define the
PTHREAD_RWLOCK_INITIALIZER macro, but it causes a bootstrap failure on
darwin8.
PR libstdc++/93244
Oops, the correct PR number is 94069. Fixed in the ChangeLog now.