summaryrefslogtreecommitdiffstats
path: root/runtime/thread_linux.cc
diff options
context:
space:
mode:
authorDave Allison <dallison@google.com>2014-05-29 08:20:04 -0700
committerDave Allison <dallison@google.com>2014-07-09 16:19:59 -0700
commit34e826ccc80dc1cf7c4c045de6b7f8360d504ccf (patch)
tree76901cff2cddd6d30cb7a4e83ad4e0c9bb673fe1 /runtime/thread_linux.cc
parentc21dc06adc8c8447561208a3fb72ccf6d0443613 (diff)
downloadart-34e826ccc80dc1cf7c4c045de6b7f8360d504ccf.tar.gz
art-34e826ccc80dc1cf7c4c045de6b7f8360d504ccf.tar.bz2
art-34e826ccc80dc1cf7c4c045de6b7f8360d504ccf.zip
Add implicit null and stack checks for x86
This adds compiler and runtime changes for x86 implicit checks. 32 bit only. Both host and target are supported. By default, on the host, the implicit checks are null pointer and stack overflow. Suspend is implemented but not switched on. Change-Id: I88a609e98d6bf32f283eaa4e6ec8bbf8dc1df78a
Diffstat (limited to 'runtime/thread_linux.cc')
-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 ee66ccc29a..518211bad7 100644
--- a/runtime/thread_linux.cc
+++ b/runtime/thread_linux.cc
@@ -35,8 +35,8 @@ static void SigAltStack(stack_t* new_stack, stack_t* old_stack) {
void Thread::SetUpAlternateSignalStack() {
// Create and set an alternate signal stack.
stack_t ss;
- ss.ss_sp = new uint8_t[SIGSTKSZ];
- ss.ss_size = SIGSTKSZ;
+ ss.ss_sp = new uint8_t[SIGSTKSZ * 2]; // NB. this is 16K.
+ ss.ss_size = SIGSTKSZ * 2;
ss.ss_flags = 0;
CHECK(ss.ss_sp != NULL);
SigAltStack(&ss, NULL);
@@ -56,7 +56,7 @@ void Thread::TearDownAlternateSignalStack() {
// Tell the kernel to stop using it.
ss.ss_sp = NULL;
ss.ss_flags = SS_DISABLE;
- ss.ss_size = SIGSTKSZ; // Avoid ENOMEM failure with Mac OS' buggy libc.
+ ss.ss_size = SIGSTKSZ * 2; // Avoid ENOMEM failure with Mac OS' buggy libc.
SigAltStack(&ss, NULL);
// Free it.