summaryrefslogtreecommitdiffstats
path: root/runtime/interpreter/interpreter_common.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2013-10-09 15:01:21 -0700
committerMathieu Chartier <mathieuc@google.com>2013-10-09 15:17:12 -0700
commite861ebd5d9490cc86200f3859f3d36fadad4588c (patch)
treebe9ad31a9175198758491e6bcd3eef5c252c2c38 /runtime/interpreter/interpreter_common.cc
parentd50f8c8e4456263e169c9998d3a1c3a6c5c51435 (diff)
downloadart-e861ebd5d9490cc86200f3859f3d36fadad4588c.zip
art-e861ebd5d9490cc86200f3859f3d36fadad4588c.tar.gz
art-e861ebd5d9490cc86200f3859f3d36fadad4588c.tar.bz2
Fix interpreter bugs.
These showed up in compaction work. Change-Id: Iac8eb0a1395c25aabba9f2e0ff6b01fc6180bdca
Diffstat (limited to 'runtime/interpreter/interpreter_common.cc')
-rw-r--r--runtime/interpreter/interpreter_common.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/interpreter/interpreter_common.cc b/runtime/interpreter/interpreter_common.cc
index f0f10bb..19f55d2 100644
--- a/runtime/interpreter/interpreter_common.cc
+++ b/runtime/interpreter/interpreter_common.cc
@@ -54,6 +54,7 @@ bool DoCall(ArtMethod* method, Object* receiver, Thread* self, ShadowFrame& shad
}
// Allocate shadow frame on the stack.
+ const char* old_cause = self->StartAssertNoThreadSuspension("DoCall");
void* memory = alloca(ShadowFrame::ComputeSize(num_regs));
ShadowFrame* new_shadow_frame(ShadowFrame::Create(num_regs, &shadow_frame, method, 0, memory));
@@ -94,9 +95,11 @@ bool DoCall(ArtMethod* method, Object* receiver, Thread* self, ShadowFrame& shad
Class* arg_type = mh.GetClassFromTypeIdx(params->GetTypeItem(shorty_pos).type_idx_);
if (arg_type == NULL) {
CHECK(self->IsExceptionPending());
+ self->EndAssertNoThreadSuspension(old_cause);
return false;
}
if (!o->VerifierInstanceOf(arg_type)) {
+ self->EndAssertNoThreadSuspension(old_cause);
// This should never happen.
self->ThrowNewExceptionF(self->GetCurrentLocationForThrow(),
"Ljava/lang/VirtualMachineError;",
@@ -144,6 +147,7 @@ bool DoCall(ArtMethod* method, Object* receiver, Thread* self, ShadowFrame& shad
}
}
}
+ self->EndAssertNoThreadSuspension(old_cause);
// Do the call now.
if (LIKELY(Runtime::Current()->IsStarted())) {