musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012年10月19日 01:33:52 -0400
committerRich Felker <dalias@aerifal.cx>2012年10月19日 01:33:52 -0400
commitebee8c2b477807fe58fd35d35783633ea08b049c (patch)
tree4127d999142191ee3509a397541b2898845fd7bc /src
parent6a04d1b8c6181eebfc1d99c6b0e190728d4fabf1 (diff)
downloadmusl-ebee8c2b477807fe58fd35d35783633ea08b049c.tar.gz
fix crashes in static-linked multithreaded programs without TLS
Diffstat (limited to 'src')
-rw-r--r--src/env/__init_tls.c 2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/env/__init_tls.c b/src/env/__init_tls.c
index ab5992ce..c341bfc1 100644
--- a/src/env/__init_tls.c
+++ b/src/env/__init_tls.c
@@ -60,6 +60,8 @@ void __init_tls(size_t *aux)
Phdr *phdr, *tls_phdr=0;
size_t base = 0;
+ libc.tls_size = sizeof(struct pthread);
+
for (p=(void *)aux[AT_PHDR],n=aux[AT_PHNUM]; n; n--,p+=aux[AT_PHENT]) {
phdr = (void *)p;
if (phdr->p_type == PT_PHDR)
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月17日 11:15:07 +0000

AltStyle によって変換されたページ (->オリジナル) /