1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

Fix bookkeeping of static TLS block for TLS_TCB_AT_TP architectures.

This commit is contained in:
Ulrich Drepper
2009-07-28 21:58:32 -07:00
parent b0948ffdcb
commit 9655389317
3 changed files with 18 additions and 5 deletions

View File

@@ -61,7 +61,10 @@ _dl_try_allocate_static_tls (struct link_map *map)
size_t n;
size_t blsize;
freebytes = GL(dl_tls_static_size) - GL(dl_tls_static_used) - TLS_TCB_SIZE;
freebytes = GL(dl_tls_static_size) - GL(dl_tls_static_used);
if (freebytes < TLS_TCB_SIZE)
goto fail;
freebytes -= TLS_TCB_SIZE;
blsize = map->l_tls_blocksize + map->l_tls_firstbyte_offset;
if (freebytes < blsize)