[14] RFR(S): 8233656: assert(d->is_CFG() && n->is_CFG()) failed: must have CFG nodes

Tobias Hartmann tobias.hartmann at oracle.com
Fri Nov 8 09:46:30 UTC 2019


Hi,

please review the following patch:
https://bugs.openjdk.java.net/browse/JDK-8233656
http://cr.openjdk.java.net/~thartmann/8233656/webrev.00/

During IGVN, we process a CastII node that carries a non-zero dependency from
GraphKit::cast_not_null [1]. ConstraintCastNode::dominating_cast then finds another CastII and
checks if it's dominating. We assert in PhaseGVN::is_dominator_helper because the other CastII has a
ProjNode as control input that has !is_CFG() because it's input is TOP [2]. The input has been
replaced in the same round of IGVN and the projection is already on the IGVN worklist but hasn't
been processed yet (it will go away).

I propose to simply check the control inputs for is_CFG().

I can reproduce the issue with a complex Javafuzzer generated test (attached to the bug) but minimal
changes/simplifications to the test cause the issue to not reproduce anymore because it depends on
the order in which nodes are processed by IGVN. So I don't think it makes sense to include that
fragile test.

This has been triggered by my fix for 8229496 [3] which added additional Cast nodes but I believe it
can also happen without these changes.

Thanks,
Tobias

[1] https://hg.openjdk.java.net/jdk/jdk/rev/86b95fc6ca32#l12.40
[2] https://hg.openjdk.java.net/jdk/jdk/file/47c20fc6a517/src/hotspot/share/opto/multnode.cpp#l83
[3] https://bugs.openjdk.java.net/browse/JDK-8229496


More information about the hotspot-compiler-dev mailing list