Fix handling of unresolved references in verifier.
The verifier should not treat use of unresolved references as a reason to reject
the entire class. Instead, the verifier treats the instruction as a throw. If
that class is run, the interpreter with extra checks will throw an exception.
Bug: 10457426
Change-Id: I3799da843a7ffb3519bbf6dc13a6276519d9cb95
diff --git a/runtime/mirror/object.h b/runtime/mirror/object.h
index efaa183..e105525 100644
--- a/runtime/mirror/object.h
+++ b/runtime/mirror/object.h
@@ -71,6 +71,11 @@
void SetClass(Class* new_klass);
+ // The verifier treats all interfaces as java.lang.Object and relies on runtime checks in
+ // invoke-interface to detect incompatible interface types.
+ bool VerifierInstanceOf(const Class* klass) const
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
bool InstanceOf(const Class* klass) const
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);