glibc/glibc-upstream-2.34-53.patch
Siddhesh Poyarekar 8e6a1ec6a4 Enable PIE by default on all architectures (#1988382)
Syncs with glibc-2.34-16.fc35.

* Tue Dec 14 2021 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.34-16
- Enable PIE by default on all architectures (#1988382)

* Tue Dec 14 2021 Florian Weimer <fweimer@redhat.com> - 2.34-15
- Sync with upstream branch release/2.34/master,
  commit 06865865151579d1aa17d38110060a68b85c5d90:
- pthread/tst-cancel28: Fix barrier re-init race condition
- Use $(pie-default) with conformtest
- Run conform/ tests using newly built libc
- nptl: Add one more barrier to nptl/tst-create1

Resolves: #1988382
2021-12-14 13:38:04 +01:00

38 lines
1.4 KiB
Diff

commit 06865865151579d1aa17d38110060a68b85c5d90
Author: Stafford Horne <shorne@gmail.com>
Date: Sat Sep 25 17:02:06 2021 +0900
pthread/tst-cancel28: Fix barrier re-init race condition
When running this test on the OpenRISC port I am working on this test
fails with a timeout. The test passes when being straced or debugged.
Looking at the code there seems to be a race condition in that:
1 main thread: calls xpthread_cancel
2 sub thread : receives cancel signal
3 sub thread : cleanup routine waits on barrier
4 main thread: re-inits barrier
5 main thread: waits on barrier
After getting to 5 the main thread and sub thread wait forever as the 2
barriers are no longer the same.
Removing the barrier re-init seems to fix this issue. Also, the barrier
does not need to be reinitialized as that is done by default.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
(cherry picked from commit 9874ca536b1d0662b1cea46af3ce09a4d42aeb32)
diff --git a/sysdeps/pthread/tst-cancel28.c b/sysdeps/pthread/tst-cancel28.c
index 627cbc8160191c5c..9286c159b3be5e8a 100644
--- a/sysdeps/pthread/tst-cancel28.c
+++ b/sysdeps/pthread/tst-cancel28.c
@@ -69,7 +69,6 @@ do_test (void)
xpthread_cancel (timer_thread);
- xpthread_barrier_init (&barrier, NULL, 2);
xpthread_barrier_wait (&barrier);
return 0;