summaryrefslogtreecommitdiff
path: root/test/536-checker-needs-access-check/src/other2/GetInaccessibleClass.java
AgeCommit message (Collapse)Author
2021-06-21Support inlining methods that may have soft verifier failures. Nicolas Geoffray
Test: 536-checker-needs-access-check Test: 675-checker-unverified-method Bug: 28313047 Change-Id: Ie532014a658935a20dbd0b6acebfda07c28c4af4
2020-09-07Add a test to 536-checker-needs-access-check. Vladimir Marko
We are currently not inlining methods that failed access checks during verification (soft-fail) but we're planning to remove those checks from the verifier. Add a test case that would expose a dex2oatd crash when we do so to make sure we fix the crash when or before relaxing the verification. Test: testrunner.py --host --optimizing -t 536 Test: Repeat the above with code modification to suppress the soft-failure in the verifier: - const RegType& res_type = ResolveClass<CheckAccess::kYes>(dex::TypeIndex(inst->VRegB_21c())); + bool hack = dex_file_->PrettyMethod(dex_method_idx_, false) == + "other2.GetInaccessibleClass.get"; + const RegType& res_type = hack + ? ResolveClass<CheckAccess::kNo>(dex::TypeIndex(inst->VRegB_21c())) + : ResolveClass<CheckAccess::kYes>(dex::TypeIndex(inst->VRegB_21c())); dex2oatd crashes: Check failed: !is_referrers_class || !needs_access_check Bug: 28313047 Change-Id: I00707232b6027574a57aa8d43b790e346d8fd959