summaryrefslogtreecommitdiffstats
path: root/runtime/entrypoints/interpreter
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2013-12-10 14:37:16 -0800
committerMathieu Chartier <mathieuc@google.com>2013-12-10 14:52:12 -0800
commitf043de4fbcf8eaa72b55597ccc6b2ea5b26a24d2 (patch)
tree4072447aba9429f9c87d1b6a0d68f2297be5d4e4 /runtime/entrypoints/interpreter
parentfa365d2fa097810f31d6cb1b1ef415636bc63af8 (diff)
downloadart-f043de4fbcf8eaa72b55597ccc6b2ea5b26a24d2.zip
art-f043de4fbcf8eaa72b55597ccc6b2ea5b26a24d2.tar.gz
art-f043de4fbcf8eaa72b55597ccc6b2ea5b26a24d2.tar.bz2
Add missing push/pop shadow frame to artInterpreterToCompiledCodeBridge.
EnsureInitialized can cause GC to occur. Since the shadow frame wasn't being pushed it meant that the references inside wouldn't get updated by the moving garbage collector. Bug: 12022098 Change-Id: I1f3fda41d14a2cf51cf524874de54d7766c362e9
Diffstat (limited to 'runtime/entrypoints/interpreter')
-rw-r--r--runtime/entrypoints/interpreter/interpreter_entrypoints.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/entrypoints/interpreter/interpreter_entrypoints.cc b/runtime/entrypoints/interpreter/interpreter_entrypoints.cc
index 05c02f2..df4ec3a 100644
--- a/runtime/entrypoints/interpreter/interpreter_entrypoints.cc
+++ b/runtime/entrypoints/interpreter/interpreter_entrypoints.cc
@@ -33,11 +33,14 @@ extern "C" void artInterpreterToCompiledCodeBridge(Thread* self, MethodHelper& m
if (method->IsStatic()) {
mirror::Class* declaringClass = method->GetDeclaringClass();
if (UNLIKELY(!declaringClass->IsInitializing())) {
+ self->PushShadowFrame(shadow_frame);
if (UNLIKELY(!Runtime::Current()->GetClassLinker()->EnsureInitialized(declaringClass,
true, true))) {
- DCHECK(Thread::Current()->IsExceptionPending());
+ self->PopShadowFrame();
+ DCHECK(self->IsExceptionPending());
return;
}
+ self->PopShadowFrame();
CHECK(declaringClass->IsInitializing());
}
}