summaryrefslogtreecommitdiff
path: root/libnativeloader/native_loader_test.cpp
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2020-09-03 15:07:20 +0100
committerVladimir Marko <vmarko@google.com>2020-09-07 08:17:59 +0000
commitb3732f82f915e0dd6a49b9d82af7ac58b049d25f (patch)
treed9a159b893b85d904de50c66c240f9f907c6a708 /libnativeloader/native_loader_test.cpp
parent4717175e40a19e79af904dfb7b7dd13f046debd7 (diff)
Add a test to 536-checker-needs-access-check.
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
Diffstat (limited to 'libnativeloader/native_loader_test.cpp')
0 files changed, 0 insertions, 0 deletions