]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* sysdeps/generic/dl-tls.c (_dl_allocate_tls_storage): Zero the space
authorRoland McGrath <roland@gnu.org>
Thu, 14 Nov 2002 00:48:38 +0000 (00:48 +0000)
committerRoland McGrath <roland@gnu.org>
Thu, 14 Nov 2002 00:48:38 +0000 (00:48 +0000)
for the new TCB.

ChangeLog
linuxthreads/ChangeLog
sysdeps/generic/dl-tls.c

index 11d3d19f6ea88ea18831258c15511bc3ce34d9c7..27ab728215553a7581457d97fc6d5add1adbbacd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-11-13  Roland McGrath  <roland@redhat.com>
+
+       * sysdeps/generic/dl-tls.c (_dl_allocate_tls_storage): Zero the space
+       for the new TCB.
+
 2002-11-13  Andreas Jaeger  <aj@suse.de>
 
        * sysdeps/unix/sysv/linux/x86_64/sigaction.c: Check for visibility
index 414e309bdf56de1336218682c4305a164abdf80b..fc48b50b784e7459ce8c69b0e5a3f7b01fc43e01 100644 (file)
@@ -1,3 +1,7 @@
+2002-11-13  Roland McGrath  <roland@redhat.com>
+
+       * Examples/ex6.c (main): Improve error reporting.
+
 2002-11-04  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
index 2c68a251b6398abf2b25671c1361d3d6d45a01f0..014c3a4809f5ae45849ea7d0a4804f6cfd25dc54 100644 (file)
@@ -262,6 +262,10 @@ _dl_allocate_tls_storage (void)
       result = (char *) result + GL(dl_tls_static_size) - TLS_TCB_SIZE;
 # endif
 
+      /* Clear the TCB data structure.  We can't ask the caller (i.e.
+        libpthread) to do it, because we will initialize the DTV et al.  */
+      memset (result, 0, TLS_TCB_SIZE);
+
       result = allocate_dtv (result);
       if (result == NULL)
        free (allocated);