summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoffer Adamsen <christofferqa@google.com>2024-04-17 19:46:07 +0200
committerChristoffer Adamsen <christofferqa@google.com>2024-04-17 19:28:47 +0000
commit680e7679b657c7319b580a9b493477c11f775660 (patch)
tree4e26c8cb063c7fee67b5dda0cb2bea021048ec46
parentb9247e265b8068750e15abb94ee57ce7234bb736 (diff)
downloadart-680e7679b657c7319b580a9b493477c11f775660.tar.gz
Check existence of class data in profman resolution
Change-Id: I7d847203bc5fbe5bfd7e94a3190e033f4a3ee0af
-rw-r--r--profman/profman.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/profman/profman.cc b/profman/profman.cc
index 18ee8dd9bb..f8266697ed 100644
--- a/profman/profman.cc
+++ b/profman/profman.cc
@@ -1329,6 +1329,10 @@ class ProfMan final {
// Class not in dex-file.
return std::nullopt;
}
+ if (dex->GetClassData(*def) == nullptr) {
+ // Class has no fields or methods.
+ return std::nullopt;
+ }
if (LIKELY(dex->GetCodeItemOffset(*def, method_index).has_value())) {
return ClassMethodReference{class_ref, method_index};
}