summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2017-04-06 17:44:07 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-04-06 17:44:09 +0000
commit25e668b6c758cfc897a411530d36a9fe57b74a06 (patch)
tree834d6ea2c4b5875b414c64a9d3226f4640f18654
parent8309d9b173b205bb9530dbd94e48731c20b8e4f4 (diff)
parent8e33e84072c6d22788e61a0b1a7db56f0ca14c26 (diff)
Merge "CHA: Don't return a non resolved class to the inliner."
-rw-r--r--compiler/optimizing/inliner.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 79cd7048a5..298ae5c847 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -371,6 +371,12 @@ ArtMethod* HInliner::TryCHADevirtualization(ArtMethod* resolved_method) {
// invoke-virtual because a proxy method doesn't have a real dex file.
return nullptr;
}
+ if (!single_impl->GetDeclaringClass()->IsResolved()) {
+ // There's a race with the class loading, which updates the CHA info
+ // before setting the class to resolved. So we just bail for this
+ // rare occurence.
+ return nullptr;
+ }
return single_impl;
}