glibc/sysdeps
Florian Weimer 5cc3385654 nptl: Add one more barrier to nptl/tst-create1
Without the bar_ctor_finish barrier, it was possible that thread2
re-locked user_lock before ctor had a chance to lock it.  ctor then
blocked in its locking operation, xdlopen from the main thread
did not return, and thread2 was stuck waiting in bar_dtor:

thread 1: started.
thread 2: started.
thread 2: locked user_lock.
constructor started: 0.
thread 1: in ctor: started.
thread 3: started.
thread 3: done.
thread 2: unlocked user_lock.
thread 2: locked user_lock.

Fixes the test in commit 83b5323261
("elf: Avoid deadlock between pthread_create and ctors [BZ #28357]").

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
2021-12-10 11:51:25 +01:00
..
aarch64 Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN 2021-12-09 23:47:49 +01:00
alpha Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN 2021-12-09 23:47:49 +01:00
arc Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN 2021-12-09 23:47:49 +01:00
arm Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN 2021-12-09 23:47:49 +01:00
csky Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN 2021-12-09 23:47:49 +01:00
generic Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN 2021-12-09 23:47:49 +01:00
gnu Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
hppa Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN 2021-12-09 23:47:49 +01:00
htl htl: Reimplement GSCOPE 2021-09-16 01:04:17 +02:00
hurd
i386 Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN 2021-12-09 23:47:49 +01:00
ia64 Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN 2021-12-09 23:47:49 +01:00
ieee754 Fixed inaccuracy of j0f (BZ #28185) 2021-10-05 13:45:37 +02:00
m68k Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN 2021-12-09 23:47:49 +01:00
mach Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN 2021-12-09 23:47:49 +01:00
microblaze Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN 2021-12-09 23:47:49 +01:00
mips Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN 2021-12-09 23:47:49 +01:00
nios2 Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN 2021-12-09 23:47:49 +01:00
nptl nptl: Add public rseq symbols and <sys/rseq.h> 2021-12-09 09:49:32 +01:00
posix posix: Remove spawni.c 2021-09-27 12:44:25 -03:00
powerpc Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN 2021-12-09 23:47:49 +01:00
pthread nptl: Add one more barrier to nptl/tst-create1 2021-12-10 11:51:25 +01:00
riscv Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN 2021-12-09 23:47:49 +01:00
s390 Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN 2021-12-09 23:47:49 +01:00
sh Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN 2021-12-09 23:47:49 +01:00
sparc Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN 2021-12-09 23:47:49 +01:00
unix nptl: Add public rseq symbols and <sys/rseq.h> 2021-12-09 09:49:32 +01:00
wordsize-32 Disable symbol hack in libc_nonshared.a 2021-09-27 07:46:25 -07:00
wordsize-64 Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
x86 nptl: Add <thread_pointer.h> for defining __thread_pointer 2021-12-09 09:49:32 +01:00
x86_64 Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN 2021-12-09 23:47:49 +01:00