Fix verifier bug caused by confusing ArtMethod::IsDirect vs ArtMethod::IsStatic semantics.
Bug: 18485243
Change-Id: I011872446490628b51fb38a353abd1d499cc1290
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc
index c206b94..441a08a 100644
--- a/runtime/verifier/method_verifier.cc
+++ b/runtime/verifier/method_verifier.cc
@@ -3168,7 +3168,7 @@
}
// See if the method type implied by the invoke instruction matches the access flags for the
// target method.
- if ((method_type == METHOD_DIRECT && !res_method->IsDirect()) ||
+ if ((method_type == METHOD_DIRECT && (!res_method->IsDirect() || res_method->IsStatic())) ||
(method_type == METHOD_STATIC && !res_method->IsStatic()) ||
((method_type == METHOD_VIRTUAL || method_type == METHOD_INTERFACE) && res_method->IsDirect())
) {