Revert "Revert "add guard pages to the internal signal stacks""
This reverts commit a3125fd1396a09a7fc4872dc4653f342150a3deb.
And Fix the prctl() problem that cause system crash.
Change-Id: Icc8d12d848cfba881a7984ca2827fd81be41f9fd
diff --git a/libc/bionic/pthread_internal.h b/libc/bionic/pthread_internal.h
index 2151e03..3b91e6a 100644
--- a/libc/bionic/pthread_internal.h
+++ b/libc/bionic/pthread_internal.h
@@ -130,6 +130,9 @@
*/
#define PTHREAD_STACK_SIZE_DEFAULT ((1 * 1024 * 1024) - SIGSTKSZ)
+/* Leave room for a guard page in the internally created signal stacks. */
+#define SIGNAL_STACK_SIZE (SIGSTKSZ + PAGE_SIZE)
+
/* Needed by fork. */
__LIBC_HIDDEN__ extern void __bionic_atfork_run_prepare();
__LIBC_HIDDEN__ extern void __bionic_atfork_run_child();