diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-07-28 21:58:32 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-07-28 21:58:32 -0700 |
commit | 9655389317c92e5935c47d90c0ba48ca54bd245e (patch) | |
tree | 0a083bd6f315f83ff3a269fbbd9b55b82996f745 /elf | |
parent | b0948ffdcbdace63317297d3d3fe2556387dfcbd (diff) | |
download | glibc-9655389317c92e5935c47d90c0ba48ca54bd245e.tar.gz glibc-9655389317c92e5935c47d90c0ba48ca54bd245e.tar.xz glibc-9655389317c92e5935c47d90c0ba48ca54bd245e.zip |
Fix bookkeeping of static TLS block for TLS_TCB_AT_TP architectures.
Diffstat (limited to 'elf')
-rw-r--r-- | elf/dl-reloc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c index 28f08de3e7..680caadd65 100644 --- a/elf/dl-reloc.c +++ b/elf/dl-reloc.c @@ -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) |