diff options
author | Mingyao Yang <mingyao@google.com> | 2015-07-22 15:56:34 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2015-07-28 20:00:45 +0000 |
commit | 681652d8e8a33bc07c5c082a71aea13d0f15e0a0 (patch) | |
tree | 5444f5832d76d91b8fef997ce6ff665b917aaf51 /test | |
parent | af50e415a187190488d4694f307c23705203c53e (diff) | |
download | art-681652d8e8a33bc07c5c082a71aea13d0f15e0a0.zip art-681652d8e8a33bc07c5c082a71aea13d0f15e0a0.tar.gz art-681652d8e8a33bc07c5c082a71aea13d0f15e0a0.tar.bz2 |
HDeoptimize should hold values live in env.
Values that are not live in compiled code anymore may still be needed in
interpreter, due to code motion, etc.
(cherry-picked from commit 718493c6c3c8e380663cb8a94e57ce160a6c473f)
Bug: 22665511
Change-Id: I8b85833c5c462f8fe36f86d6026a51b07563995a
Diffstat (limited to 'test')
-rw-r--r-- | test/449-checker-bce/expected.txt | 1 | ||||
-rw-r--r-- | test/449-checker-bce/src/Main.java | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/test/449-checker-bce/expected.txt b/test/449-checker-bce/expected.txt index e69de29..e114c50 100644 --- a/test/449-checker-bce/expected.txt +++ b/test/449-checker-bce/expected.txt @@ -0,0 +1 @@ +java.lang.ArrayIndexOutOfBoundsException: length=5; index=82 diff --git a/test/449-checker-bce/src/Main.java b/test/449-checker-bce/src/Main.java index 7a45ce3..c7246e0 100644 --- a/test/449-checker-bce/src/Main.java +++ b/test/449-checker-bce/src/Main.java @@ -1101,6 +1101,28 @@ public class Main { } + public void testExceptionMessage() { + short[] B1 = new short[5]; + int[] B2 = new int[5]; + Exception err = null; + try { + testExceptionMessage1(B1, B2, null, -1, 6); + } catch (Exception e) { + err = e; + } + System.out.println(err); + } + + void testExceptionMessage1(short[] a1, int[] a2, long a3[], int start, int finish) { + int j = finish + 77; + // Bug: 22665511 + // A deoptimization will be triggered here right before the loop. Need to make + // sure the value of j is preserved for the interpreter. + for (int i = start; i <= finish; i++) { + a2[j - 1] = a1[i + 1]; + } + } + // Make sure this method is compiled with optimizing. // CHECK-START: void Main.main(java.lang.String[]) register (after) // CHECK: ParallelMove @@ -1141,6 +1163,7 @@ public class Main { }; testUnknownBounds(); + new Main().testExceptionMessage(); } } |