1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Don't assert() the TLS allocation requested is big enough; just

fix the argument.

In particular, this is a step towards breaking crt1's dependence on stdio.
This commit is contained in:
Tim Kientzle 2007-02-25 21:23:50 +00:00
parent b141b9655f
commit 0031cdf4d7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166995

View File

@ -36,7 +36,6 @@
#include <stdlib.h>
#include <string.h>
#include <elf.h>
#include <assert.h>
#include "libc_private.h"
@ -207,7 +206,8 @@ __libc_allocate_tls(void *oldtls, size_t tcbsize, size_t tcbalign)
size = round(tls_static_space, tcbalign);
assert(tcbsize >= 2*sizeof(Elf_Addr));
if (tcbsize < 2 * sizeof(Elf_Addr))
tcbsize = 2 * sizeof(Elf_Addr);
tls = calloc(1, size + tcbsize);
dtv = malloc(3 * sizeof(Elf_Addr));