diff options
| author | 2019-09-09 10:51:16 -0700 | |
|---|---|---|
| committer | 2019-09-09 20:49:04 +0000 | |
| commit | 5c93af3cc8894deefbc9cba69ea69526c45842aa (patch) | |
| tree | 6f79a408832449163fcb2e320ad992393a2e8f32 | |
| parent | 8f70b9672c13a5ca19cf2c54ace3cb2f342f743a (diff) | |
Loosen verifier around interface-invoke-super
We were being overly strict with interface-invoke-super and not
allowing an interface to invoke-super into its own methods without
going to the interpreter. This causes some scala programs to run
mostly in the interpreter. Our compiler is able to handle this
correctly so we should allow it without any soft-verification
failures.
Test: ./test.py --host
Bug: 140589303
Change-Id: I40d9510add5bbfd41d2e38b68973fce77880f7e6
| -rw-r--r-- | runtime/verifier/method_verifier.cc | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc index c506df1395..839491ec3e 100644 --- a/runtime/verifier/method_verifier.cc +++ b/runtime/verifier/method_verifier.cc @@ -4284,13 +4284,6 @@ ArtMethod* MethodVerifier<kVerifierDebug>::VerifyInvocationArgs( return nullptr; } if (reference_type.GetClass()->IsInterface()) { - // TODO Can we verify anything else. - if (class_idx == class_def_.class_idx_) { - Fail(VERIFY_ERROR_CLASS_CHANGE) << "Cannot invoke-super on self as interface"; - return nullptr; - } - // TODO Revisit whether we want to allow invoke-super on direct interfaces only like the JLS - // does. if (!GetDeclaringClass().HasClass()) { Fail(VERIFY_ERROR_NO_CLASS) << "Unable to resolve the full class of 'this' used in an" << "interface invoke-super"; |