diff options
author | Dave Allison <dallison@google.com> | 2014-08-14 00:01:12 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-08-12 19:23:43 +0000 |
commit | b74ff132f217776c1ab698712bc2dbc526297288 (patch) | |
tree | 86da3e98cbd942bb4c2fda6f0f50fd44c1c0a101 /runtime/mirror/art_method.cc | |
parent | 826f1038187e00399a8c6e0044ad0ea29c0ba000 (diff) | |
parent | 648d7112609dd19c38131b3e71c37bcbbd19d11e (diff) | |
download | art-b74ff132f217776c1ab698712bc2dbc526297288.zip art-b74ff132f217776c1ab698712bc2dbc526297288.tar.gz art-b74ff132f217776c1ab698712bc2dbc526297288.tar.bz2 |
Merge "Reduce stack usage for overflow checks"
Diffstat (limited to 'runtime/mirror/art_method.cc')
-rw-r--r-- | runtime/mirror/art_method.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/mirror/art_method.cc b/runtime/mirror/art_method.cc index e88a390..370bfb9 100644 --- a/runtime/mirror/art_method.cc +++ b/runtime/mirror/art_method.cc @@ -283,6 +283,11 @@ uint32_t ArtMethod::FindCatchBlock(Handle<ArtMethod> h_this, Handle<Class> excep void ArtMethod::Invoke(Thread* self, uint32_t* args, uint32_t args_size, JValue* result, const char* shorty) { + if (UNLIKELY(__builtin_frame_address(0) < self->GetStackEnd())) { + ThrowStackOverflowError(self); + return; + } + if (kIsDebugBuild) { self->AssertThreadSuspensionIsAllowable(); CHECK_EQ(kRunnable, self->GetState()); |