summaryrefslogtreecommitdiffstats
path: root/runtime/runtime.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-09-12 17:01:24 -0700
committerMathieu Chartier <mathieuc@google.com>2014-09-12 18:27:38 -0700
commit7c438b19b71932ac8a44eff44f20744a01559c8d (patch)
treef724004a682cb7c2faa0d12579756c3a81b98252 /runtime/runtime.cc
parentebab3bbcaa09b644acd50ec18d79cb0d239bf347 (diff)
downloadart-7c438b19b71932ac8a44eff44f20744a01559c8d.tar.gz
art-7c438b19b71932ac8a44eff44f20744a01559c8d.tar.bz2
art-7c438b19b71932ac8a44eff44f20744a01559c8d.zip
Fix stale root error in verifier
There was a stale root error caused by the static roots from the reg types. These were visitied if there was an active verifier in the method_verifiers_ but this is not always the case when a GC is run. The fix is to always visit the static method verifier roots. This only showed up as a bug without an image since these roots were primitive classes and always in the image, and therefore didn't ever need to be updated due to moving GC. (cherry picked from commit 6167864e28e4e12658ebdbaf1d5239acdaf4aaa4) Change-Id: I592f2770570de97b431671cfbd409f63697892f1
Diffstat (limited to 'runtime/runtime.cc')
-rw-r--r--runtime/runtime.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index bf1e01654c..b4a09e5cef 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1147,6 +1147,7 @@ void Runtime::VisitNonThreadRoots(RootCallback* callback, void* arg) {
callee_save_methods_[i].VisitRoot(callback, arg, 0, kRootVMInternal);
}
}
+ verifier::MethodVerifier::VisitStaticRoots(callback, arg);
{
MutexLock mu(Thread::Current(), method_verifier_lock_);
for (verifier::MethodVerifier* verifier : method_verifiers_) {