summaryrefslogtreecommitdiffstats
path: root/runtime/quick_exception_handler.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-12-19 18:41:47 -0800
committerMathieu Chartier <mathieuc@google.com>2015-01-06 14:12:18 -0800
commit4306ef8a7ec8e3887e51f64e80d940d974cc3ac3 (patch)
tree5afff3c97de1458886154aa5e84e1c0ae0edf11f /runtime/quick_exception_handler.cc
parentd30feca670d0af02783bbdfd4a29c5078c18bdc5 (diff)
downloadandroid_art-4306ef8a7ec8e3887e51f64e80d940d974cc3ac3.tar.gz
android_art-4306ef8a7ec8e3887e51f64e80d940d974cc3ac3.tar.bz2
android_art-4306ef8a7ec8e3887e51f64e80d940d974cc3ac3.zip
Don't allow suspension from FindLocksAtDexPc
Transitioning to suspended from runnable sometimes runs dump checkpoints in ThreadStress which can cause deadlocks. This happens since FindLocksAtDexPC runs the verifier which calls AllowThreadSuspension. This results in a blocked thread which holds the monitor lock, and if another thread tries to do a monitor enter, it deadlocks while holding the mutator lock (assuming the GC is suspending all). The fix for avoiding this deadlock is not calling AllowThreadSuspension from FindLocksAtDexPc. Bug: 18576985 Change-Id: I7e5faaf3bbbd5b5f680de95d53c33b5106705b0c
Diffstat (limited to 'runtime/quick_exception_handler.cc')
-rw-r--r--runtime/quick_exception_handler.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc
index 90c9fe7c32..3517848927 100644
--- a/runtime/quick_exception_handler.cc
+++ b/runtime/quick_exception_handler.cc
@@ -214,7 +214,7 @@ class DeoptimizeStackVisitor FINAL : public StackVisitor {
Handle<mirror::ArtMethod> h_method(hs.NewHandle(m));
verifier::MethodVerifier verifier(self_, h_dex_cache->GetDexFile(), h_dex_cache, h_class_loader,
&m->GetClassDef(), code_item, m->GetDexMethodIndex(),
- h_method, m->GetAccessFlags(), false, true, true);
+ h_method, m->GetAccessFlags(), false, true, true, true);
verifier.Verify();
const std::vector<int32_t> kinds(verifier.DescribeVRegs(dex_pc));
for (uint16_t reg = 0; reg < num_regs; ++reg) {