summaryrefslogtreecommitdiffstats
path: root/runtime/verifier
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2015-05-21 14:06:46 -0700
committerAndreas Gampe <agampe@google.com>2015-05-21 14:06:46 -0700
commit8110447356f559688d6290563e912af7f8d4709b (patch)
tree0fadefcc69ee6506ff1b3faad1ee397ec1d2d56c /runtime/verifier
parent99ca40cf9d390479a7243b8b3321cad7d9faa2a4 (diff)
downloadart-8110447356f559688d6290563e912af7f8d4709b.zip
art-8110447356f559688d6290563e912af7f8d4709b.tar.gz
art-8110447356f559688d6290563e912af7f8d4709b.tar.bz2
ART: Sometimes even empty methods take forever to verify
In cases of very high load and/or bad scheduling, the verifier may take longer than the threshold duration to verify an empty method. The LargeMethod detection needs to accept that the code_item may be null. Bug: 21364300 Change-Id: Iceff3e4688cc1a5fe7a836f7a9bf6c49a392b618
Diffstat (limited to 'runtime/verifier')
-rw-r--r--runtime/verifier/method_verifier.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc
index 1b1bc54..6c58d55 100644
--- a/runtime/verifier/method_verifier.cc
+++ b/runtime/verifier/method_verifier.cc
@@ -287,6 +287,10 @@ MethodVerifier::FailureKind MethodVerifier::VerifyClass(Thread* self,
}
static bool IsLargeMethod(const DexFile::CodeItem* const code_item) {
+ if (code_item == nullptr) {
+ return false;
+ }
+
uint16_t registers_size = code_item->registers_size_;
uint32_t insns_size = code_item->insns_size_in_code_units_;