am da1bdb40: am 5cd66baf: Merge "Add a test for a dalvik interface cache bug."
* commit 'da1bdb40e08de6ceae1b6e6735ff3549b937f26e':
Add a test for a dalvik interface cache bug.
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_interface/Test_invoke_interface.java b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_interface/Test_invoke_interface.java
index 377cc58..ae06cda 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_interface/Test_invoke_interface.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_interface/Test_invoke_interface.java
@@ -90,6 +90,29 @@
}
/**
+ * @title dvmInterpFindInterfaceMethod failures were putting NULL Method*s
+ * in the interface cache, leading to a null pointer deference the second
+ * time you made the same bad call, with no exception thrown.
+ * See http://code.google.com/p/android/issues/detail?id=29358 for details.
+ */
+ public void testE4_2() {
+ //@uses dot.junit.opcodes.invoke_interface.d.T_invoke_interface_11
+ //@uses dot.junit.opcodes.invoke_interface.ITest
+ //@uses dot.junit.opcodes.invoke_interface.ITestImpl
+ T_invoke_interface_11 t = new T_invoke_interface_11();
+ try {
+ t.run();
+ fail("expected IncompatibleClassChangeError");
+ } catch (IncompatibleClassChangeError expected) {
+ }
+ try {
+ t.run();
+ fail("expected IncompatibleClassChangeError");
+ } catch (IncompatibleClassChangeError expected) {
+ }
+ }
+
+ /**
* @title Native method can't be linked
*/
public void testE5() {