From c771787169fd4c7212211a51d13e3506ca2ffc39 Mon Sep 17 00:00:00 2001 From: David Xu Date: Tue, 28 Mar 2006 06:14:22 +0000 Subject: [PATCH] Er, forgot to clear tls space to zero for Variant II. --- libexec/rtld-elf/rtld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 9824c3e91d5c..670c32590f77 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2804,7 +2804,7 @@ allocate_tls(Obj_Entry *objs, void *oldtls, size_t tcbsize, size_t tcbalign) size = round(tls_static_space, tcbalign); assert(tcbsize >= 2*sizeof(Elf_Addr)); - tls = malloc(size + tcbsize); + tls = calloc(1, size + tcbsize); dtv = calloc(1, (tls_max_index + 2) * sizeof(Elf_Addr)); segbase = (Elf_Addr)(tls + size);