aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-10-15 08:38:53 +0000
committerRoland McGrath <roland@gnu.org>2002-10-15 08:38:53 +0000
commit9cbc282304d0c7293dc6f91ee0d40d968b6abf0b (patch)
tree104455073931650d3cd3de786aa9bd25140e2a7a
parenta7a2ea5a7188141aea4ae04be77f9b83b837649c (diff)
downloadglibc-9cbc282304d0c7293dc6f91ee0d40d968b6abf0b.tar
glibc-9cbc282304d0c7293dc6f91ee0d40d968b6abf0b.tar.gz
glibc-9cbc282304d0c7293dc6f91ee0d40d968b6abf0b.tar.bz2
glibc-9cbc282304d0c7293dc6f91ee0d40d968b6abf0b.zip
* sysdeps/generic/dl-tls.c (_dl_deallocate_tls) [TLS_TCB_AT_TP]:
Adjust TCB pointer before calling free, so we get the whole block. 2002-10-14 Roland McGrath <roland@redhat.com> * sysdeps/unix/sysv/linux/x86_64/sigaction.c [HAVE_HIDDEN && !HAVE_BROKEN_VISIBILITY_ATTRIBUTE]: Declare restore_rt extern using attribute_hidden instead of static, avoids warning.
-rw-r--r--ChangeLog11
-rw-r--r--sysdeps/generic/dl-tls.c8
2 files changed, 18 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d0b02a153e..735021a8f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2002-10-15 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/generic/dl-tls.c (_dl_deallocate_tls) [TLS_TCB_AT_TP]:
+ Adjust TCB pointer before calling free, so we get the whole block.
+
+2002-10-14 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/unix/sysv/linux/x86_64/sigaction.c
+ [HAVE_HIDDEN && !HAVE_BROKEN_VISIBILITY_ATTRIBUTE]: Declare restore_rt
+ extern using attribute_hidden instead of static, avoids warning.
+
2002-10-09 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/configure.in: Use */lib64 for s390x too.
diff --git a/sysdeps/generic/dl-tls.c b/sysdeps/generic/dl-tls.c
index a6428652cf..b92fecbe27 100644
--- a/sysdeps/generic/dl-tls.c
+++ b/sysdeps/generic/dl-tls.c
@@ -356,7 +356,13 @@ _dl_deallocate_tls (void *tcb, bool dealloc_tcb)
free (dtv - 1);
if (dealloc_tcb)
- free (tcb);
+ {
+# if TLS_TCB_AT_TP
+ /* The TCB follows the TLS blocks. Back up to free the whole block. */
+ tcb -= GL(dl_tls_static_size) - TLS_TCB_SIZE;
+# endif
+ free (tcb);
+ }
}