summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2015-12-10 21:28:58 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-12-10 21:28:58 +0000
commit170e01a6b59b3242a5afc76c3a03c00ce288150f (patch)
tree4ae775d15f51efb704ca5b00a2ee4b6fb6615812 /test
parent34760f9a97e6a1733edfca1b13199f749106a30f (diff)
parentc96205e03bd4f991ad1540df38f9f692ef211b22 (diff)
Merge "Revert "ART: Check invoke-interface earlier in verifier""
Diffstat (limited to 'test')
-rw-r--r--test/800-smali/expected.txt1
-rw-r--r--test/800-smali/smali/b_21869691A.smali47
-rw-r--r--test/800-smali/smali/b_21869691B.smali33
-rw-r--r--test/800-smali/smali/b_21869691C.smali12
-rw-r--r--test/800-smali/smali/b_21869691I.smali11
-rw-r--r--test/800-smali/src/Main.java4
6 files changed, 1 insertions, 107 deletions
diff --git a/test/800-smali/expected.txt b/test/800-smali/expected.txt
index ebefeea405..a590cf1e0b 100644
--- a/test/800-smali/expected.txt
+++ b/test/800-smali/expected.txt
@@ -47,5 +47,4 @@ b/23300986 (2)
b/23502994 (if-eqz)
b/23502994 (check-cast)
b/25494456
-b/21869691
Done!
diff --git a/test/800-smali/smali/b_21869691A.smali b/test/800-smali/smali/b_21869691A.smali
deleted file mode 100644
index a7a6ef4bc2..0000000000
--- a/test/800-smali/smali/b_21869691A.smali
+++ /dev/null
@@ -1,47 +0,0 @@
-# Test that the verifier does not stash methods incorrectly because they are being invoked with
-# the wrong opcode.
-#
-# When using invoke-interface on a method id that is not from an interface class, we should throw
-# an IncompatibleClassChangeError. FindInterfaceMethod assumes that the given type is an interface,
-# so we can construct a class hierarchy that would have a surprising result:
-#
-# interface I {
-# void a();
-# }
-#
-# class B implements I {
-# // miranda method for a, or a implemented.
-# }
-#
-# class C extends B {
-# }
-#
-# Then calling invoke-interface C.a() will go wrong if there is no explicit check: a can't be found
-# in C, but in the interface table, so we will find an interface method and pass ICCE checks.
-#
-# If we do this before a correct invoke-virtual C.a(), we poison the dex cache with an incorrect
-# method. In this test, this is done in A (A < B, so processed first). The "real" call is in B.
-
-.class public LB21869691A;
-
-.super Ljava/lang/Object;
-
-.method public constructor <init>()V
- .registers 1
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- return-void
-.end method
-
-.method public run()V
- .registers 3
- new-instance v0, LB21869691C;
- invoke-direct {v0}, LB21869691C;-><init>()V
- invoke-virtual {v2, v0}, LB21869691A;->callinf(LB21869691C;)V
- return-void
-.end method
-
-.method public callinf(LB21869691C;)V
- .registers 2
- invoke-interface {p1}, LB21869691C;->a()V
- return-void
-.end method
diff --git a/test/800-smali/smali/b_21869691B.smali b/test/800-smali/smali/b_21869691B.smali
deleted file mode 100644
index 1172bdba52..0000000000
--- a/test/800-smali/smali/b_21869691B.smali
+++ /dev/null
@@ -1,33 +0,0 @@
-# Test that the verifier does not stash methods incorrectly because they are being invoked with
-# the wrong opcode. See b_21869691A.smali for explanation.
-
-.class public abstract LB21869691B;
-
-.super Ljava/lang/Object;
-.implements LB21869691I;
-
-.method protected constructor <init>()V
- .registers 1
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- return-void
-.end method
-
-# Have an implementation for the interface method.
-.method public a()V
- .registers 1
- return-void
-.end method
-
-# Call ourself with invoke-virtual.
-.method public callB()V
- .registers 1
- invoke-virtual {p0}, LB21869691B;->a()V
- return-void
-.end method
-
-# Call C with invoke-virtual.
-.method public callB(LB21869691C;)V
- .registers 2
- invoke-virtual {p1}, LB21869691C;->a()V
- return-void
-.end method
diff --git a/test/800-smali/smali/b_21869691C.smali b/test/800-smali/smali/b_21869691C.smali
deleted file mode 100644
index 4f89a046cd..0000000000
--- a/test/800-smali/smali/b_21869691C.smali
+++ /dev/null
@@ -1,12 +0,0 @@
-# Test that the verifier does not stash methods incorrectly because they are being invoked with
-# the wrong opcode. See b_21869691A.smali for explanation.
-
-.class public LB21869691C;
-
-.super LB21869691B;
-
-.method public constructor <init>()V
- .registers 1
- invoke-direct {p0}, LB21869691B;-><init>()V
- return-void
-.end method
diff --git a/test/800-smali/smali/b_21869691I.smali b/test/800-smali/smali/b_21869691I.smali
deleted file mode 100644
index 72a27ddd2c..0000000000
--- a/test/800-smali/smali/b_21869691I.smali
+++ /dev/null
@@ -1,11 +0,0 @@
-# Test that the verifier does not stash methods incorrectly because they are being invoked with
-# the wrong opcode.
-#
-# This is the interface class that has an "a" method.
-
-.class public abstract interface LB21869691I;
-
-.super Ljava/lang/Object;
-
-.method public abstract a()V
-.end method
diff --git a/test/800-smali/src/Main.java b/test/800-smali/src/Main.java
index 3b62a46fd3..4844848337 100644
--- a/test/800-smali/src/Main.java
+++ b/test/800-smali/src/Main.java
@@ -139,8 +139,6 @@ public class Main {
new Object[] { "abc" }, null, null));
testCases.add(new TestCase("b/25494456", "B25494456", "run", null, new VerifyError(),
null));
- testCases.add(new TestCase("b/21869691", "B21869691A", "run", null,
- new IncompatibleClassChangeError(), null));
}
public void runTests() {
@@ -210,7 +208,7 @@ public class Main {
tc.expectedException.getClass().getName() +
", but got " + exc.getClass(), exc);
} else {
- // Expected exception, do nothing.
+ // Expected exception, do nothing.
}
} finally {
if (errorReturn != null) {