runtime: Don't skip verification for -Xverify:soft-fail
When forcing the interpreter into access checks mode,
make sure that the regular verification is still run,
giving the verifier an opportunity to throw a VerifyError.
If verification would've succeeded (without -Xverify:soft-fail flag),
override this and soft-fail, to force the interpreter-with-access-checks to be run
instead of the normal faster interpreter.
This fixes the following run-tests under the interpeter-access-checks:
* 135
* 412
* 471
* 506
* 800
Bug: 22414682
Change-Id: I5cb86a8bba71c7af9361a63c0802786c852b857b
diff --git a/runtime/art_method.h b/runtime/art_method.h
index 440e796..a020e9d 100644
--- a/runtime/art_method.h
+++ b/runtime/art_method.h
@@ -173,13 +173,13 @@
bool IsProxyMethod() SHARED_REQUIRES(Locks::mutator_lock_);
- bool IsPreverified() {
- return (GetAccessFlags() & kAccPreverified) != 0;
+ bool SkipAccessChecks() {
+ return (GetAccessFlags() & kAccSkipAccessChecks) != 0;
}
- void SetPreverified() {
- DCHECK(!IsPreverified());
- SetAccessFlags(GetAccessFlags() | kAccPreverified);
+ void SetSkipAccessChecks() {
+ DCHECK(!SkipAccessChecks());
+ SetAccessFlags(GetAccessFlags() | kAccSkipAccessChecks);
}
// Returns true if this method could be overridden by a default method.