summaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2015-09-22 11:16:15 -0700
committerYabin Cui <yabinc@google.com>2015-09-23 16:36:20 -0700
commit01030c24b0e3ace1b4cdaf415354e2f315f4f3a9 (patch)
tree2e2783f4dd323f970e63aa2c4f1ed2181b95a09d /libc
parent829119425bcc2b5fcec8fdf219026a5192c81234 (diff)
downloadbionic-01030c24b0e3ace1b4cdaf415354e2f315f4f3a9.zip
bionic-01030c24b0e3ace1b4cdaf415354e2f315f4f3a9.tar.gz
bionic-01030c24b0e3ace1b4cdaf415354e2f315f4f3a9.tar.bz2
Increase alternative signal stack size on 64-bit devices.
Bug: 23041777 Bug: 24187462 Change-Id: I7d84c0cc775a74753a3e8e101169c0fb5dbf7437
Diffstat (limited to 'libc')
-rw-r--r--libc/bionic/pthread_internal.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/libc/bionic/pthread_internal.h b/libc/bionic/pthread_internal.h
index 3b91e6a..6a39a21 100644
--- a/libc/bionic/pthread_internal.h
+++ b/libc/bionic/pthread_internal.h
@@ -130,8 +130,13 @@ __LIBC_HIDDEN__ void pthread_key_clean_all(void);
*/
#define PTHREAD_STACK_SIZE_DEFAULT ((1 * 1024 * 1024) - SIGSTKSZ)
-/* Leave room for a guard page in the internally created signal stacks. */
+// Leave room for a guard page in the internally created signal stacks.
+#if defined(__LP64__)
+// SIGSTKSZ is not big enough for 64-bit arch. See http://b/23041777.
+#define SIGNAL_STACK_SIZE (16 * 1024 + PAGE_SIZE)
+#else
#define SIGNAL_STACK_SIZE (SIGSTKSZ + PAGE_SIZE)
+#endif
/* Needed by fork. */
__LIBC_HIDDEN__ extern void __bionic_atfork_run_prepare();