summaryrefslogtreecommitdiffstats
path: root/runtime/mirror/object.h
diff options
context:
space:
mode:
authorJeff Hao <jeffhao@google.com>2013-09-03 19:07:00 -0700
committerJeff Hao <jeffhao@google.com>2013-09-24 16:26:02 -0700
commitdeb43702e611d6c75b459ea352a00f5d98fc0aa9 (patch)
tree3a85938cf895bbdf3082eb5cf6a235514818a2ec /runtime/mirror/object.h
parentabcf7ae8deba4ee81dec44f3d1a2f0ecaf032859 (diff)
downloadandroid_art-deb43702e611d6c75b459ea352a00f5d98fc0aa9.tar.gz
android_art-deb43702e611d6c75b459ea352a00f5d98fc0aa9.tar.bz2
android_art-deb43702e611d6c75b459ea352a00f5d98fc0aa9.zip
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 (cherry picked from commit a3faaf4bece7f42529c013fe87bd41de59798656) Change-Id: I161bfdbfa116890ffa9e7a593c756229bd939eb4
Diffstat (limited to 'runtime/mirror/object.h')
-rw-r--r--runtime/mirror/object.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/mirror/object.h b/runtime/mirror/object.h
index efaa183498..e105525f79 100644
--- a/runtime/mirror/object.h
+++ b/runtime/mirror/object.h
@@ -71,6 +71,11 @@ class MANAGED Object {
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_);