JDK-8275330 : C2: assert(n->is_Root() || n->is_Region() || n->is_Phi() || n->is_MachMerge() || def_block->dominates(block)) failed: uses must be dominated by definitions
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,17.0.2,18
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-10-15
  • Updated: 2022-04-19
  • Resolved: 2021-11-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 17 JDK 18
11.0.16Fixed 17.0.3-oracleFixed 18 b26Fixed
Related Reports
Relates :  
Description
(synopsis is provisional, feel free to change it)

The attached Fuzzer test fails like:

$ ../build/linux-x86_64-server-fastdebug/images/jdk/bin/java -Xmx512m -XX:+UnlockDiagnosticVMOptions -Xcomp -XX:CompileOnly=Test -XX:-TieredCompilation Test

#  Internal Error (/home/shade/trunks/jdk/src/hotspot/share/opto/block.cpp:1252), pid=956055, tid=956068
#  assert(n->is_Root() || n->is_Region() || n->is_Phi() || n->is_MachMerge() || def_block->dominates(block)) failed: uses must be dominated by definitions

Bisection points to JDK-8272562 as the starting point.
Comments
Fix request (11u): Reason for the backport: - it helps for the backport of 8280799 (ะก2: assert(false) failed: cyclic dependency prevents range check elimination) that we've encountered with 11 - while I can't reproduce the failure with 11, I see no reason the bug wouldn't exit in 11 as well (so not critical for 11 but nice to have) The patch doesn't apply cleanly. Backport reviewed here: https://github.com/openjdk/jdk11u-dev/pull/1002 I tested this with tier1 and some compile the world/fuzzer tests.
07-04-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk11u-dev/pull/1002 Date: 2022-04-05 11:58:31 +0000
05-04-2022

Fix request [17u] I backport this for parity with 17.0.3-oracle. A C2 fix we should not skip. Clean backport. Test passes. SAP nightly testing passes.
08-02-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk17u-dev/pull/143 Date: 2022-02-02 14:13:40 +0000
02-02-2022

Changeset: 3e798dd4 Author: Roland Westrelin <roland@openjdk.org> Date: 2021-11-26 09:48:09 +0000 URL: https://git.openjdk.java.net/jdk/commit/3e798dd40c68439f3220445e679b9e0e495435d8
26-11-2021

ILW = Assertion failure in C2 code generation, single Java Fuzzer test, disable compilation of affected method = HLM = P3
15-10-2021