summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2015-06-24 09:37:39 -0700
committerChristopher Ferris <cferris@google.com>2015-06-24 12:04:35 -0700
commit94e7c05f11056cc49cb66c752d68069866432d51 (patch)
treecfc22d5252467f64c47e5604758eee4cb19e8cb1 /runtime
parent466efcc89c7e55bf90d2af0aa92cc5e8fc2bd4f2 (diff)
downloadart-94e7c05f11056cc49cb66c752d68069866432d51.zip
art-94e7c05f11056cc49cb66c752d68069866432d51.tar.gz
art-94e7c05f11056cc49cb66c752d68069866432d51.tar.bz2
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 (cherry picked from commit e34c71ce21dbc9fac3427df887e90e1311b6fa8e) Change-Id: Ib1105a3470064d98843bd46f32d4fadb1d20e416
Diffstat (limited to 'runtime')
-rw-r--r--runtime/thread_linux.cc6
1 files changed, 3 insertions, 3 deletions
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 @@ static void SigAltStack(stack_t* new_stack, stack_t* old_stack) {
}
// 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.