Reserve enough user request stack space in pthread_create.
Bug: 18830897
Change-Id: I1ba4aaeaf66a7ff99c5d82ad45469011171b0a3b
diff --git a/libc/bionic/pthread_exit.cpp b/libc/bionic/pthread_exit.cpp
index e04cf8e..ee76e2b 100644
--- a/libc/bionic/pthread_exit.cpp
+++ b/libc/bionic/pthread_exit.cpp
@@ -89,7 +89,7 @@
// Keep track of what we need to know about the stack before we lose the pthread_internal_t.
void* stack_base = thread->attr.stack_base;
- size_t stack_size = thread->attr.stack_size;
+ size_t stack_size = thread->allocated_stack_size;
bool free_stack = false;
pthread_mutex_lock(&g_thread_list_lock);