mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04: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:
parent
b141b9655f
commit
0031cdf4d7
1 changed files with 2 additions and 2 deletions
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue