1 commit 2c1094bd700e63a8d7f547b3f5495bedb55c0a08
2 Author: Ulrich Drepper <drepper@gmail.com>
3 Date: Thu Dec 22 22:43:39 2011 -0500
5 Create internal threads with sufficient stack size
7 Index: glibc-2.12-2-gc4ccff1/nptl/Versions
8 ===================================================================
9 --- glibc-2.12-2-gc4ccff1.orig/nptl/Versions
10 +++ glibc-2.12-2-gc4ccff1/nptl/Versions
11 @@ -255,6 +255,6 @@ libpthread {
13 __pthread_initialize_minimal;
14 __pthread_clock_gettime; __pthread_clock_settime;
16 + __pthread_unwind; __pthread_get_minstack;
19 Index: glibc-2.12-2-gc4ccff1/nptl/nptl-init.c
20 ===================================================================
21 --- glibc-2.12-2-gc4ccff1.orig/nptl/nptl-init.c
22 +++ glibc-2.12-2-gc4ccff1/nptl/nptl-init.c
23 @@ -507,3 +507,13 @@ __pthread_initialize_minimal_internal (i
25 strong_alias (__pthread_initialize_minimal_internal,
26 __pthread_initialize_minimal)
30 +__pthread_get_minstack (const pthread_attr_t *attr)
32 + struct pthread_attr *iattr = (struct pthread_attr *) attr;
34 + return (GLRO(dl_pagesize) + __static_tls_size + PTHREAD_STACK_MIN
35 + + iattr->guardsize);
37 Index: glibc-2.12-2-gc4ccff1/nptl/pthreadP.h
38 ===================================================================
39 --- glibc-2.12-2-gc4ccff1.orig/nptl/pthreadP.h
40 +++ glibc-2.12-2-gc4ccff1/nptl/pthreadP.h
41 @@ -397,6 +397,7 @@ weak_function;
43 extern void __pthread_init_static_tls (struct link_map *) attribute_hidden;
45 +extern size_t __pthread_get_minstack (const pthread_attr_t *attr);
47 /* Namespace save aliases. */
48 extern int __pthread_getschedparam (pthread_t thread_id, int *policy,
49 Index: glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/timer_routines.c
50 ===================================================================
51 --- glibc-2.12-2-gc4ccff1.orig/nptl/sysdeps/unix/sysv/linux/timer_routines.c
52 +++ glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/timer_routines.c
53 @@ -165,7 +165,7 @@ __start_helper_thread (void)
54 and should go away automatically when canceled. */
56 (void) pthread_attr_init (&attr);
57 - (void) pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN);
58 + (void) pthread_attr_setstacksize (&attr, __pthread_get_minstack (&attr));
60 /* Block all signals in the helper thread but SIGSETXID. To do this
61 thoroughly we temporarily have to block all signals here. The