JDK-8188223 : IfNode::range_check_trap_proj() should handle dying subgraph with single if proj
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 10
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2017-10-02
  • Updated: 2019-01-14
  • Resolved: 2017-10-23
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 10 JDK 8
10 b31Fixed 8u181Fixed
Description
I see the following failure (running lucene tests) that I can't reproduce anymore (removed replay file by mistake):

assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || outcnt() == 2) failed: bad if #1

V  [libjvm.so+0x105f0ca]  MultiNode::proj_out(unsigned int) const+0x144
V  [libjvm.so+0xc91b1a]  IfNode::range_check_trap_proj(int&, Node*&, Node*&)+0x1f2
V  [libjvm.so+0xc91b8e]  RangeCheckNode::is_range_check(Node*&, Node*&, int&)+0x56
V  [libjvm.so+0xc96a02]  RangeCheckNode::Ideal(PhaseGVN*, bool)+0x1d0

With subgraph shape:

UNC->Region->IfProj->RangeCheck

The region has the IfProj as single input. RegionNode::Ideal() finds that the subgraph is unreachable which causes the IfProj to be removed. RangeCheckNode::Ideal() is called on a dominated range check which walks the graph, hit the RangeCheck that has a single projection and causes a crash.
Comments
No regression test, depends on processing order of IR nodes.
19-03-2018

initial ILW = Assert failure; rare, not reproducible, not sure how this will effect product build; no workaround = HLH = P2
03-10-2017