diff options
author | Ian Rogers <irogers@google.com> | 2014-08-14 01:38:07 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-08-14 00:12:54 +0000 |
commit | a7a45aa4349d6b7e698cddecce603fb312c55e76 (patch) | |
tree | 1ecef20845fd321c5a6e81fb0fbd8852d64d0a34 /runtime | |
parent | 04a685d86cdf7d386f9dc2efc1626f04becace4e (diff) | |
parent | c24a1e00b13a7ebf10dd896f6a18b1ad09617ec7 (diff) | |
download | art-a7a45aa4349d6b7e698cddecce603fb312c55e76.zip art-a7a45aa4349d6b7e698cddecce603fb312c55e76.tar.gz art-a7a45aa4349d6b7e698cddecce603fb312c55e76.tar.bz2 |
Merge "Ensure alternate signal stack is minimum size."
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/thread_linux.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/thread_linux.cc b/runtime/thread_linux.cc index 9aacb30..1254056 100644 --- a/runtime/thread_linux.cc +++ b/runtime/thread_linux.cc @@ -33,8 +33,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. -static constexpr int kHostAltSigStackSize = 16*1024; // 16K signal stack. +// handler this is too small. We allocate 16K instead or 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; void Thread::SetUpAlternateSignalStack() { // Create and set an alternate signal stack. |