projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a04d1b
)
fix crashes in static-linked multithreaded programs without TLS
author
Rich Felker
<dalias@aerifal.cx>
Fri, 19 Oct 2012 05:33:52 +0000
(
01:33
-0400)
committer
Rich Felker
<dalias@aerifal.cx>
Fri, 19 Oct 2012 05:33:52 +0000
(
01:33
-0400)
src/env/__init_tls.c
patch
|
blob
|
history
diff --git
a/src/env/__init_tls.c
b/src/env/__init_tls.c
index ab5992ce1c928eaccddc44bd8f301f2a5b98a981..c341bfc17d67a9c4f65f9bef0a89a1580125f691 100644
(file)
--- 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)