-
Bug
-
Resolution: Fixed
-
P3
-
11, 17, 19
-
b24
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8288835 | 17.0.5-oracle | Tobias Hartmann | P3 | Resolved | Fixed | b01 |
JDK-8289130 | 17.0.5 | Goetz Lindenmaier | P3 | Resolved | Fixed | b01 |
JDK-8288834 | 11.0.17-oracle | Tobias Hartmann | P3 | Resolved | Fixed | b01 |
JDK-8290438 | 11.0.17 | Goetz Lindenmaier | P3 | Resolved | Fixed | b01 |
HOW TO REPRODUCE
$ javac Test.java FuzzerUtils.java
$ java Test
# Internal Error (/home/roland/jdk-jdk/src/hotspot/share/opto/superword.cpp:113), pid=4077494, tid=4077507
# assert(!lpt->has_reduction_nodes() || cl->is_reduction_loop()) failed: non-reduction loop contains reduction nodes
#
# JRE version: OpenJDK Runtime Environment (19.0) (fastdebug build 19-internal-adhoc.roland.jdk-jdk)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 19-internal-adhoc.roland.jdk-jdk, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x1a3cb04] SuperWord::transform_loop(IdealLoopTree*, bool)+0x424
FAILURE ANALYSIS
The node corresponding to (acc += j) is marked as a reduction together with its (inner) loop:
int i = 0, acc = 0;
do {
int j = 0;
do { // inner loop marked as a reduction
if (b) {
acc += j; // node marked as a reduction
}
j++;
} while (j < 5);
i++;
} while (i < 100);
return acc;
After unrolling and constant-folding the inner loop (b is always true), the node formerly corresponding to (acc += j), and now corresponding to (acc += 10), is hoisted into the outer loop, which is not marked as a reduction. This creates an inconsistent state that is later caught by the failing assertion:
int i = 0, acc = 0;
do {
acc += 10; // node marked as a reduction (inconsistent, outer loop is not marked as a reduction)
i++;
} while (i < 100);
return acc;
- backported by
-
JDK-8288834 C2: "failed: non-reduction loop contains reduction nodes" assert failure
- Resolved
-
JDK-8288835 C2: "failed: non-reduction loop contains reduction nodes" assert failure
- Resolved
-
JDK-8289130 C2: "failed: non-reduction loop contains reduction nodes" assert failure
- Resolved
-
JDK-8290438 C2: "failed: non-reduction loop contains reduction nodes" assert failure
- Resolved
- relates to
-
JDK-8279622 C2: miscompilation of map pattern as a vector reduction
- Resolved
-
JDK-8290964 C2 compilation fails with assert "non-reduction loop contains reduction nodes"
- Resolved
-
JDK-8289197 [17u] Push of backport of 8286177 did not remove assertion
- Resolved
-
JDK-8287087 C2: perform SLP reduction analysis on-demand
- Resolved
- links to
-
Commit openjdk/jdk11u-dev/a10ef716
-
Commit openjdk/jdk17u-dev/caceaba5
-
Commit openjdk/jdk/6458a56e
-
Review openjdk/jdk11u-dev/1195
-
Review openjdk/jdk17u-dev/495
-
Review openjdk/jdk/8805