Handle interpreter / access-checks mode in the runtime.
Stop requiring multiple image kinds for run tests, and have the runtime
adjust method flags and entrypoints when it is running interpreter-only
or with soft fail verification.
Test: test.py
Change-Id: I813fe17e49d2b07545577ecf4ce7b6af62e3bef9
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 56ae307..b749bb8 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -2147,6 +2147,14 @@
}, space->Begin(), image_pointer_size_);
}
+ if (runtime->IsVerificationSoftFail()) {
+ header.VisitPackedArtMethods([&](ArtMethod& method) REQUIRES_SHARED(Locks::mutator_lock_) {
+ if (!method.IsNative() && method.IsInvokable()) {
+ method.ClearSkipAccessChecks();
+ }
+ }, space->Begin(), image_pointer_size_);
+ }
+
ClassTable* class_table = nullptr;
{
WriterMutexLock mu(self, *Locks::classlinker_classes_lock_);