JDK-8238765 : PhaseCFG::schedule_pinned_nodes cannot handle precedence edges from unmatched CFG nodes correctly
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,12,13,14,15
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-02-10
  • Updated: 2022-06-27
  • Resolved: 2020-02-17
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 13 JDK 15
11.0.8-oracleFixed 13.0.4Fixed 15 b11Fixed
Related Reports
Relates :  
Description
The internal testing for JDK 14 revealed a case where a precedence edge from a not yet matched CFG node (i.e. a node in the middle of a block) was processed by PhaseCFG::schedule_pinned_nodes. As a result, the is_dominator() check returned a wrong answer which later resulted in a segfault due to a wrong block ordering produced by GCM together with StressGCM. In this case, a load was moved before the associated NULL check. This, however, was only observed by using ZGC but it appears to be unrelated to ZGC itself. With ZGC, an ArrayAllocation expands before a LoadP which is used for a LoadRange node later in such a way that PhaseCFG::schedule_pinned_nodes faces a precedence edge for that LoadRange node from a CFG node that is not yet machted (i.e. in the middle of a block).

The internal test used -XX:+UseZGC and -XX:+StressGCM.
Comments
Fix request (13u): The original change applies cleanly, passes tier1,tier2,tier3 tests.
05-06-2020

Fix request (11u) -- will label after testing completed. I would like to downport this for parity with 11.0.8-oracle. Applies clean.
09-04-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/b4a8d0c9da88 User: chagedorn Date: 2020-02-17 13:19:28 +0000
17-02-2020

Could be related to JDK-8237859 where a load is somehow floated above a range check but only observable with ZGC. In this bug, a load is floated above a NULL check - also only observable with ZGC.
11-02-2020

ILW = Crash in C2 compiled code, with ZGC (experimental) and stress option, use different GC = HLM = P3
10-02-2020

Could not be reproduced with JDK 11, however the affected code was introduced in JDK 9 (JDK-8139771). Therefore, also adding 11-13 to the affected versions.
10-02-2020