Increase alt signal stack to 32K on host.
On host, when there is a crash, the code tries to do an unwind
from the signal handler. Under some conditions this can require
a stack larger than 16K, so increase this value to 32K.
The symptom of this is that you get an empty backtrace running
art tests when there is a crash.
Bug: 21949571
Change-Id: I8306da55e35212a0f349e43a7f2ad546e8da8c76
diff --git a/runtime/thread_linux.cc b/runtime/thread_linux.cc
index 0731f30..9d54eba 100644
--- a/runtime/thread_linux.cc
+++ b/runtime/thread_linux.cc
@@ -36,11 +36,11 @@
}
// The default SIGSTKSZ on linux is 8K. If we do any logging in a signal
-// handler this is too small. We allocate 16K instead or the minimum signal
-// stack size.
+// handler or do a stack unwind, this is too small. We allocate 32K
+// instead of the minimum signal stack size.
// TODO: We shouldn't do logging (with locks) in signal handlers.
static constexpr int kHostAltSigStackSize =
- 16 * KB < MINSIGSTKSZ ? MINSIGSTKSZ : 16 * KB;
+ 32 * KB < MINSIGSTKSZ ? MINSIGSTKSZ : 32 * KB;
void Thread::SetUpAlternateSignalStack() {
// Create and set an alternate signal stack.