diff options
| author | 2018-09-04 09:25:12 -0700 | |
|---|---|---|
| committer | 2018-09-04 09:27:43 -0700 | |
| commit | ff71e663a08b4218fc9d08f8e65ad7da84a4ab99 (patch) | |
| tree | eac052f9eb2a23f395338bf08d6e526a45375b89 | |
| parent | 77bb25b037d120ecbf5e7bbd90be6375b9e61957 (diff) | |
Revert "ART: Restrict some checks in the verifier to P+"
This reverts commit 2337d53846d9d2e7f82f8cf64ff25585ad010339.
Changeset is incomplete and triggers debug errors.
Bug: 111969862
Test: n/a
Change-Id: I74b5feb054403696433be24147b5484f2c3d27e9
| -rw-r--r-- | runtime/verifier/method_verifier.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc index e22afaa72a..2064fc427e 100644 --- a/runtime/verifier/method_verifier.cc +++ b/runtime/verifier/method_verifier.cc @@ -3675,11 +3675,9 @@ const RegType& MethodVerifier::ResolveClass(dex::TypeIndex class_idx) { // the access-checks interpreter. If result is primitive, skip the access check. // // Note: we do this for unresolved classes to trigger re-verification at runtime. - if (C == CheckAccess::kYes && - result->IsNonZeroReferenceTypes() && - (api_level_ >= 28u || !result->IsUnresolvedTypes())) { + if (C == CheckAccess::kYes && result->IsNonZeroReferenceTypes()) { const RegType& referrer = GetDeclaringClass(); - if ((api_level_ >= 28u || !referrer.IsUnresolvedTypes()) && !referrer.CanAccess(*result)) { + if (!referrer.CanAccess(*result)) { Fail(VERIFY_ERROR_ACCESS_CLASS) << "(possibly) illegal class access: '" << referrer << "' -> '" << *result << "'"; } @@ -4739,7 +4737,7 @@ void MethodVerifier::VerifyISFieldAccess(const Instruction* inst, const RegType& DCHECK(!can_load_classes_ || self_->IsExceptionPending()); self_->ClearException(); } - } else if (api_level_ >= 28u) { + } else { // If we don't have the field (it seems we failed resolution) and this is a PUT, we need to // redo verification at runtime as the field may be final, unless the field id shows it's in // the same class. |