From f89fd840a0c4ae9e868b4c541ea7660ce2ffda59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Fri, 20 Nov 2009 18:08:56 +0000 Subject: [PATCH] bonefish+stippi: PThreads didn't have their array for the TLS values initialized. From what we can tell, this would have been a problem for any program using pthreads, but since all threads are pthreads now, it was much more likely to be encountered. Like in Beam as reported in #4949 (which via libbind seems to use some pthread stuff). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34161 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/libroot/posix/pthread/pthread.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/system/libroot/posix/pthread/pthread.c b/src/system/libroot/posix/pthread/pthread.c index b702de4863..ffd1f5a4d4 100644 --- a/src/system/libroot/posix/pthread/pthread.c +++ b/src/system/libroot/posix/pthread/pthread.c @@ -86,6 +86,8 @@ __allocate_pthread(void *data) thread->cleanup_handlers = NULL; thread->flags = 0; + memset(thread->specific, 0, sizeof(thread->specific)); + return thread; }