about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog5
-rw-r--r--nptl/pthread_create.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 707744a657..3a1dde6f43 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,8 @@
+2013-03-28  Roland McGrath  <roland@hack.frob.com>
+
+	* pthread_create.c (start_thread) [!SHARED]:
+	Call __call_tls_dtors only if it's not NULL.
+
 2013-03-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
 	* allocatestack.c (allocate_stack): Use __default_pthread_attr
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index c18278cf08..c43077fe2d 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -312,7 +312,10 @@ start_thread (void *arg)
     }
 
   /* Call destructors for the thread_local TLS variables.  */
-  __call_tls_dtors ();
+#ifndef SHARED
+  if (&__call_tls_dtors != NULL)
+#endif
+    __call_tls_dtors ();
 
   /* Run the destructor for the thread-local data.  */
   __nptl_deallocate_tsd ();