diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-12-15 19:26:29 -0800 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-12-15 19:31:40 -0800 |
commit | 487c1c9a0ae4022ef01c95bd92a6ea9cb14dc59c (patch) | |
tree | e165a620f4f1db106c7a9937ace88ddb0ff77888 | |
parent | 50d55c65f3096bccbccddef3aa734ee15647cbe5 (diff) | |
download | art-487c1c9a0ae4022ef01c95bd92a6ea9cb14dc59c.zip art-487c1c9a0ae4022ef01c95bd92a6ea9cb14dc59c.tar.gz art-487c1c9a0ae4022ef01c95bd92a6ea9cb14dc59c.tar.bz2 |
Don't add or remove verifiers if aborting
Prevents deadlock if marking verifier roots fails when we attempt to
dump the stack traces. The deadlock occurs from FindLocksAtDexPC
since this allocates a new verifier then adds / removes it from the
method_verifiers_ array.
Bug: 18651054
Change-Id: Ia9b9470ce5e4ac20bfbb39bef0283974cf487765
-rw-r--r-- | runtime/runtime.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc index 07e2ec0..e91f7c0 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -1380,12 +1380,18 @@ void Runtime::SetCompileTimeClassPath(jobject class_loader, void Runtime::AddMethodVerifier(verifier::MethodVerifier* verifier) { DCHECK(verifier != nullptr); + if (gAborting) { + return; + } MutexLock mu(Thread::Current(), method_verifier_lock_); method_verifiers_.insert(verifier); } void Runtime::RemoveMethodVerifier(verifier::MethodVerifier* verifier) { DCHECK(verifier != nullptr); + if (gAborting) { + return; + } MutexLock mu(Thread::Current(), method_verifier_lock_); auto it = method_verifiers_.find(verifier); CHECK(it != method_verifiers_.end()); |