summaryrefslogtreecommitdiffstats
path: root/runtime/entrypoints/entrypoint_utils.cc
diff options
context:
space:
mode:
authorDave Allison <dallison@google.com>2014-03-27 15:10:22 -0700
committerDave Allison <dallison@google.com>2014-03-31 18:04:08 -0700
commitf943914730db8ad2ff03d49a2cacd31885d08fd7 (patch)
tree885a781e5f8bd852e2c1615108ae7b17576a6567 /runtime/entrypoints/entrypoint_utils.cc
parentcfd5acf281b0c509f86b13d73c6a8dfa3ea9922c (diff)
downloadart-f943914730db8ad2ff03d49a2cacd31885d08fd7.zip
art-f943914730db8ad2ff03d49a2cacd31885d08fd7.tar.gz
art-f943914730db8ad2ff03d49a2cacd31885d08fd7.tar.bz2
Implement implicit stack overflow checks
This also fixes some failing run tests due to missing null pointer markers. The implementation of the implicit stack overflow checks introduces the ability to have a gap in the stack that is skipped during stack walk backs. This gap is protected against read/write and is used to trigger a SIGSEGV at function entry if the stack will overflow. Change-Id: I0c3e214c8b87dc250cf886472c6d327b5d58653e
Diffstat (limited to 'runtime/entrypoints/entrypoint_utils.cc')
-rw-r--r--runtime/entrypoints/entrypoint_utils.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/entrypoints/entrypoint_utils.cc b/runtime/entrypoints/entrypoint_utils.cc
index 9e5f54c..c81706f 100644
--- a/runtime/entrypoints/entrypoint_utils.cc
+++ b/runtime/entrypoints/entrypoint_utils.cc
@@ -134,7 +134,9 @@ void ThrowStackOverflowError(Thread* self) {
LOG(ERROR) << "Couldn't throw new StackOverflowError because JNI ThrowNew failed.";
CHECK(self->IsExceptionPending());
}
- self->ResetDefaultStackEnd(); // Return to default stack size.
+
+ bool explicit_overflow_check = Runtime::Current()->ExplicitStackOverflowChecks();
+ self->ResetDefaultStackEnd(!explicit_overflow_check); // Return to default stack size.
}
JValue InvokeProxyInvocationHandler(ScopedObjectAccessUnchecked& soa, const char* shorty,