about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRyan S. Arnold <rsa@linux.vnet.ibm.com>2011-07-01 07:02:57 -0500
committerRyan S. Arnold <rsa@us.ibm.com>2011-07-01 07:02:57 -0500
commitdb90a4844fc2f0eb7d6a45a317d9e625cca370e8 (patch)
treec1341379359ca813e55dad0beefcc75a66181ef0
parentec11dbe1aabbb45d41f5e9c21e315e2496f3b473 (diff)
downloadglibc-db90a4844fc2f0eb7d6a45a317d9e625cca370e8.tar.gz
glibc-db90a4844fc2f0eb7d6a45a317d9e625cca370e8.tar.xz
glibc-db90a4844fc2f0eb7d6a45a317d9e625cca370e8.zip
Set stacksize in __aio_create_helper_thread to default for AIO with TLS.
-rw-r--r--ChangeLog7
-rw-r--r--nptl/sysdeps/unix/sysv/linux/aio_misc.h5
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index cb874565c0..625f9de6db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-06-30  Ryan S. Arnold  <rsa@linux.vnet.ibm.com>
+
+	* nptl/sysdeps/unix/sysv/linux/aio_misc.h
+	(__aio_create_helper_thread): Set the pthread_attr stacksize to the
+	default, 0.  When previously set to PTHREAD_STACK_MIN, pthread_create
+	would fail if TLS requirements on the stack exceed that small value.
+
 2011-06-28  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
 
 	* sysdeps/powerpc/fpu/e_hypot.c: optimizations for POWER5 and POWER6.
diff --git a/nptl/sysdeps/unix/sysv/linux/aio_misc.h b/nptl/sysdeps/unix/sysv/linux/aio_misc.h
index 406d96e865..a692b50e49 100644
--- a/nptl/sysdeps/unix/sysv/linux/aio_misc.h
+++ b/nptl/sysdeps/unix/sysv/linux/aio_misc.h
@@ -46,8 +46,9 @@ __aio_create_helper_thread (pthread_t *threadp, void *(*tf) (void *),
   pthread_attr_init (&attr);
   pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
 
-  /* The helper thread needs only very little resources.  */
-  (void) pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN);
+  /* Leave the stack size as the default or it can be too small for TLS
+   * requirements if set to PTHREAD_STACK_MIN.  */
+  (void) pthread_attr_setstacksize (&attr, 0);
 
   /* Block all signals in the helper thread.  To do this thoroughly we
      temporarily have to block all signals here.  */