summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSebastien Hertz <shertz@google.com>2013-10-29 17:50:55 +0100
committerSebastien Hertz <shertz@google.com>2013-10-29 18:12:34 +0100
commit8249b425ba81d804c222c746e31bfcac9516e759 (patch)
tree1743aef5417c31921d4d33a837790a0a743813cb /test
parentad3d996316dd90b84b4b29ccdfc4aeeb1ec890ee (diff)
downloadart-8249b425ba81d804c222c746e31bfcac9516e759.tar.gz
art-8249b425ba81d804c222c746e31bfcac9516e759.tar.bz2
art-8249b425ba81d804c222c746e31bfcac9516e759.zip
Avoid verifier crash for quickened invoke on null.
When verifying an invoke-virtual-quick on a "null" instance, we can't infer the class of the method being invoked. This CL handles this case and avoid a crash due to a failed check in RegType::GetClass. Also revert changes made to test 082-inline-execute since it succeeds with this CL now. Bug: 11427954 Change-Id: I4b2c1deaa43b144684539acea471543716f36fb3
Diffstat (limited to 'test')
-rw-r--r--test/082-inline-execute/src/Main.java12
1 files changed, 4 insertions, 8 deletions
diff --git a/test/082-inline-execute/src/Main.java b/test/082-inline-execute/src/Main.java
index b881b34802..f4d2dd114a 100644
--- a/test/082-inline-execute/src/Main.java
+++ b/test/082-inline-execute/src/Main.java
@@ -37,10 +37,6 @@ public class Main {
test_String_length();
}
- private static String nullString() {
- return null;
- }
-
public static void test_String_length() {
String str0 = "";
String str1 = "x";
@@ -50,7 +46,7 @@ public class Main {
Assert.assertEquals(str1.length(), 1);
Assert.assertEquals(str80.length(), 80);
- String strNull = nullString();
+ String strNull = null;
try {
strNull.length();
Assert.fail();
@@ -65,7 +61,7 @@ public class Main {
Assert.assertTrue(str0.isEmpty());
Assert.assertFalse(str1.isEmpty());
- String strNull = nullString();
+ String strNull = null;
try {
strNull.isEmpty();
Assert.fail();
@@ -92,7 +88,7 @@ public class Main {
} catch (StringIndexOutOfBoundsException expected) {
}
- String strNull = nullString();
+ String strNull = null;
try {
strNull.charAt(0);
Assert.fail();
@@ -137,7 +133,7 @@ public class Main {
Assert.assertEquals(str40.indexOf('a',10), 10);
Assert.assertEquals(str40.indexOf('b',40), -1);
- String strNull = nullString();
+ String strNull = null;
try {
strNull.indexOf('a');
Assert.fail();