-
Bug
-
Resolution: Fixed
-
P2
-
11, 12, 13, 14
-
b16
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8241654 | 13.0.3 | Roland Westrelin | P2 | Resolved | Fixed | b02 |
JDK-8231816 | 11.0.6-oracle | Roland Westrelin | P2 | Closed | Fixed | b01 |
JDK-8231925 | 11.0.6 | Roland Westrelin | P2 | Resolved | Fixed | b01 |
The patch below applied to an existing test case causes fails with an incorrect result.
diff -r d003b3ef8b60 test/hotspot/jtreg/compiler/escapeAnalysis/TestSelfArrayCopy.java
--- a/test/hotspot/jtreg/compiler/escapeAnalysis/TestSelfArrayCopy.java Mon Sep 16 09:28:54 2019 +0200
+++ b/test/hotspot/jtreg/compiler/escapeAnalysis/TestSelfArrayCopy.java Mon Sep 16 11:58:55 2019 +0200
@@ -43,7 +43,7 @@
// Non-escaping allocation
Integer[] array = {rI1, rI2};
// Arraycopy with src == dst
- System.arraycopy(array, 0, array, 0, array.length - 1);
+ System.arraycopy(array, 0, array, 1, 1);
if (b) {
// Uncommon trap
System.out.println(array[0]);
@@ -52,7 +52,7 @@
}
public static void main(String[] args) {
- int expected = rI1 + rI2;
+ int expected = rI1 + rI1;
// Trigger compilation
for (int i = 0; i < 20_000; ++i) {
int result = test();
@@ -60,5 +60,10 @@
throw new RuntimeException("Incorrect result: " + result + " != " + expected);
}
}
+ b = true;
+ int result = test();
+ if (result != expected) {
+ throw new RuntimeException("Incorrect result: " + result + " != " + expected);
+ }
}
}
diff -r d003b3ef8b60 test/hotspot/jtreg/compiler/escapeAnalysis/TestSelfArrayCopy.java
--- a/test/hotspot/jtreg/compiler/escapeAnalysis/TestSelfArrayCopy.java Mon Sep 16 09:28:54 2019 +0200
+++ b/test/hotspot/jtreg/compiler/escapeAnalysis/TestSelfArrayCopy.java Mon Sep 16 11:58:55 2019 +0200
@@ -43,7 +43,7 @@
// Non-escaping allocation
Integer[] array = {rI1, rI2};
// Arraycopy with src == dst
- System.arraycopy(array, 0, array, 0, array.length - 1);
+ System.arraycopy(array, 0, array, 1, 1);
if (b) {
// Uncommon trap
System.out.println(array[0]);
@@ -52,7 +52,7 @@
}
public static void main(String[] args) {
- int expected = rI1 + rI2;
+ int expected = rI1 + rI1;
// Trigger compilation
for (int i = 0; i < 20_000; ++i) {
int result = test();
@@ -60,5 +60,10 @@
throw new RuntimeException("Incorrect result: " + result + " != " + expected);
}
}
+ b = true;
+ int result = test();
+ if (result != expected) {
+ throw new RuntimeException("Incorrect result: " + result + " != " + expected);
+ }
}
}
- backported by
-
JDK-8231925 C2: arraycopy with same non escaping src and dest but different positions causes wrong execution
-
- Resolved
-
-
JDK-8241654 C2: arraycopy with same non escaping src and dest but different positions causes wrong execution
-
- Resolved
-
-
JDK-8231816 C2: arraycopy with same non escaping src and dest but different positions causes wrong execution
-
- Closed
-
- relates to
-
JDK-8229016 C2 scalarization crashes with assert(node->Opcode() == Op_CastP2X) failed: ConvP2XNode required
-
- Closed
-
-
JDK-8231665 8231055 broke escapeAnalysis/TestSelfArrayCopy.java
-
- Resolved
-