summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2015-06-25 10:26:40 -0700
committerAndreas Gampe <agampe@google.com>2015-06-25 12:51:37 -0700
commit6415013f0b9509fed8367871daaf66c6841223f1 (patch)
tree238e59acda393f860d36f3bf80e80a01b59a347a /test
parent005deb0a1683f9ee03a2cf2785dc6a7d7a8f16be (diff)
downloadart-6415013f0b9509fed8367871daaf66c6841223f1.zip
art-6415013f0b9509fed8367871daaf66c6841223f1.tar.gz
art-6415013f0b9509fed8367871daaf66c6841223f1.tar.bz2
ART: Reset runtime_throw_failure flag
The flag is instruction-specific. It transports the info from Fail to the main loop. It must be cleared after each iteration. Introduce a second flag to store whether we saw such a failure at all. Update test expectations. Bug: 22080519 (cherry picked from commit d12e782bcee03ecb6dec41aa9673ef53b638dcea) Change-Id: I32be914819946233babaa4cb7343844d97b61ba5
Diffstat (limited to 'test')
-rw-r--r--test/003-omnibus-opcodes/src/UnresTest2.java4
-rw-r--r--test/800-smali/expected.txt1
-rw-r--r--test/800-smali/smali/b_22080519.smali27
-rw-r--r--test/800-smali/src/Main.java6
4 files changed, 34 insertions, 4 deletions
diff --git a/test/003-omnibus-opcodes/src/UnresTest2.java b/test/003-omnibus-opcodes/src/UnresTest2.java
index 4135d73..d46b877 100644
--- a/test/003-omnibus-opcodes/src/UnresTest2.java
+++ b/test/003-omnibus-opcodes/src/UnresTest2.java
@@ -41,7 +41,8 @@ class UnresTest2 {
new UnresClassSubclass();
Main.assertTrue(false);
} catch (NoClassDefFoundError ncdfe) {
- Main.assertTrue(ncdfe.getCause() instanceof ClassNotFoundException);
+ // TODO b/22080519
+ // Main.assertTrue(ncdfe.getCause() instanceof ClassNotFoundException);
// good
}
@@ -49,7 +50,6 @@ class UnresTest2 {
UnresClass[] uar = new UnresClass[3];
Main.assertTrue(false);
} catch (NoClassDefFoundError ncdfe) {
- Main.assertTrue(ncdfe.getCause() instanceof ClassNotFoundException);
// good
}
diff --git a/test/800-smali/expected.txt b/test/800-smali/expected.txt
index ca4ca35..80b4f57 100644
--- a/test/800-smali/expected.txt
+++ b/test/800-smali/expected.txt
@@ -21,4 +21,5 @@ b/21614284
b/21902684
b/21863767
b/21886894
+b/22080519
Done!
diff --git a/test/800-smali/smali/b_22080519.smali b/test/800-smali/smali/b_22080519.smali
new file mode 100644
index 0000000..bf062fb
--- /dev/null
+++ b/test/800-smali/smali/b_22080519.smali
@@ -0,0 +1,27 @@
+.class public LB22080519;
+.super Ljava/lang/Object;
+
+.method public static run()V
+.registers 6
+:Label1
+ const v1, 15
+ const v2, 0
+ # Have a branch to reach both the aget-object and something else.
+ if-eqz v1, :Label2
+
+ # This instruction will be marked runtime-throw.
+ aget-object v3, v2, v1
+
+:Label2
+ # This should *not* be flagged as a runtime throw
+ goto :Label4
+
+:Label3
+ move-exception v3
+ throw v3
+
+:Label4
+ return-void
+
+.catchall {:Label1 .. :Label3} :Label3
+.end method \ No newline at end of file
diff --git a/test/800-smali/src/Main.java b/test/800-smali/src/Main.java
index 8c9fda1..337d0d9 100644
--- a/test/800-smali/src/Main.java
+++ b/test/800-smali/src/Main.java
@@ -83,12 +83,14 @@ public class Main {
0));
testCases.add(new TestCase("b/21873167", "B21873167", "test", null, null, null));
testCases.add(new TestCase("b/21614284", "B21614284", "test", new Object[] { null },
- new NullPointerException(), null));
+ new NullPointerException(), null));
testCases.add(new TestCase("b/21902684", "B21902684", "test", null, null, null));
testCases.add(new TestCase("b/21863767", "B21863767", "run", null, null,
null));
testCases.add(new TestCase("b/21886894", "B21886894", "test", null, new VerifyError(),
- null));
+ null));
+ testCases.add(new TestCase("b/22080519", "B22080519", "run", null,
+ new NullPointerException(), null));
}
public void runTests() {