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_exit.cpp b/libc/bionic/pthread_exit.cpp
index 1de85f5..ceda931 100644
--- a/libc/bionic/pthread_exit.cpp
+++ b/libc/bionic/pthread_exit.cpp
@@ -87,7 +87,7 @@
sigaltstack(&ss, NULL);
// Free it.
- munmap(thread->alternate_signal_stack, SIGSTKSZ);
+ munmap(thread->alternate_signal_stack, SIGNAL_STACK_SIZE);
thread->alternate_signal_stack = NULL;
}