]> sourceware.org Git - glibc.git/commitdiff
* sysdeps/generic/dl-tls.c (__tls_get_addr): After freeing block in
authorRoland McGrath <roland@gnu.org>
Fri, 11 Oct 2002 09:18:04 +0000 (09:18 +0000)
committerRoland McGrath <roland@gnu.org>
Fri, 11 Oct 2002 09:18:04 +0000 (09:18 +0000)
now-unused dtv slot, reset the slot to TLS_DTV_UNALLOCATED.

* elf/tls-macros.h [__x86_64__] (TLS_GD): Fix the sequence with the
proper set of no-op insn prefixes.

* elf/tst-tls8.c (do_test): Use %zd format for l_tls_modid members.

ChangeLog
elf/tst-tls8.c
sysdeps/generic/dl-tls.c

index 082b332f422d09195fa32620e66c4d790e4e43fe..f9d0630c30d0fb45e33116c45888e5d5cdf8b29e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2002-10-11  Roland McGrath  <roland@redhat.com>
+
+       * sysdeps/generic/dl-tls.c (__tls_get_addr): After freeing block in
+       now-unused dtv slot, reset the slot to TLS_DTV_UNALLOCATED.
+
+       * elf/tls-macros.h [__x86_64__] (TLS_GD): Fix the sequence with the
+       proper set of no-op insn prefixes.
+
+       * elf/tst-tls8.c (do_test): Use %zd format for l_tls_modid members.
+
 2002-10-11  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/generic/pselect.c: Avoid unnecessary sigprocmask calls.
index 971ee565cbf3280f0cb9e4736ec25a2df44f809e..e300bc53d8bf0689d222a67f043b4da2ba47fd50 100644 (file)
@@ -39,7 +39,7 @@ do_test (void)
        modid1 = ((struct link_map *) h1)->l_tls_modid;
       else if (((struct link_map *) h1)->l_tls_modid != modid1)
        {
-         printf ("round %d: modid now %d, initially %d\n",
+         printf ("round %d: modid now %zd, initially %d\n",
                  i, ((struct link_map *) h1)->l_tls_modid, modid1);
          result = 1;
        }
@@ -69,7 +69,7 @@ do_test (void)
        modid2 = ((struct link_map *) h1)->l_tls_modid;
       else if (((struct link_map *) h1)->l_tls_modid != modid2)
        {
-         printf ("round %d: modid now %d, initially %d\n",
+         printf ("round %d: modid now %zd, initially %d\n",
                  i, ((struct link_map *) h1)->l_tls_modid, modid2);
          result = 1;
        }
@@ -108,7 +108,7 @@ do_test (void)
         time.  The value of the first round is used.  */
       if (((struct link_map *) h1)->l_tls_modid != modid1)
        {
-         printf ("round %d: modid now %d, initially %d\n",
+         printf ("round %d: modid now %zd, initially %d\n",
                  i, ((struct link_map *) h1)->l_tls_modid, modid1);
          result = 1;
        }
@@ -136,7 +136,7 @@ do_test (void)
         time.  The value of the first round is used.  */
       if (((struct link_map *) h1)->l_tls_modid != modid2)
        {
-         printf ("round %d: modid now %d, initially %d\n",
+         printf ("round %d: modid now %zd, initially %d\n",
                  i, ((struct link_map *) h1)->l_tls_modid, modid2);
          result = 1;
        }
index fe8f7916384a8b485b2f0d6982c0ffe7ae143312..a6428652cfad6f009f6fb8e2161bcfa259bd2e45 100644 (file)
@@ -500,7 +500,10 @@ __tls_get_addr (GET_ADDR_ARGS)
                      /* If this modid was used at some point the memory
                         might still be allocated.  */
                      if (dtv[total + cnt].pointer != TLS_DTV_UNALLOCATED)
-                       free (dtv[total + cnt].pointer);
+                       {
+                         free (dtv[total + cnt].pointer);
+                         dtv[total + cnt].pointer = TLS_DTV_UNALLOCATED;
+                       }
 
                      continue;
                    }
This page took 0.051822 seconds and 5 git commands to generate.