summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2004-08-23 15:30:05 +0000
committerdfr <dfr@FreeBSD.org>2004-08-23 15:30:05 +0000
commite31ba8b9a7549dd0684c271115943854ac43c0ab (patch)
treef027e468e40f38d553ac06f943b5fafe8a24b561 /lib/libc
parentcdc7ba74f956041b8a824bb293f4777c7759ca1c (diff)
downloadFreeBSD-src-e31ba8b9a7549dd0684c271115943854ac43c0ab.zip
FreeBSD-src-e31ba8b9a7549dd0684c271115943854ac43c0ab.tar.gz
Make sure we allocate at least enough space for the TCB for variant I TLS.
MFC after: 3 days
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/tls.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/gen/tls.c b/lib/libc/gen/tls.c
index 7a3ebfe..6948912 100644
--- a/lib/libc/gen/tls.c
+++ b/lib/libc/gen/tls.c
@@ -109,6 +109,8 @@ _rtld_allocate_tls(void *oldtls, size_t tcbsize, size_t tcbalign)
Elf_Addr *dtv;
size = tls_static_space;
+ if (size < tcbsize)
+ size = tcbsize;
tls = malloc(size);
dtv = malloc(3 * sizeof(Elf_Addr));
OpenPOWER on IntegriCloud