diff options
-rw-r--r-- | lib/libc/gen/tls.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/tls.c b/lib/libc/gen/tls.c index 5bc4b87..a669f99 100644 --- a/lib/libc/gen/tls.c +++ b/lib/libc/gen/tls.c @@ -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)); |