Vector API: Crashes due to VectorBoxNode->is_CFG() == false

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Mon Nov 27 16:39:44 UTC 2017


Hi,

While experimenting with Vector API I observed different crashes (e.g., 
[1] [2]) caused by VectorBoxNode being marked as non-CFG node.

hotspot/src/share/vm/opto/vectornode.hpp:
class VectorBoxNode : public CallNode {
...
   virtual       bool  is_CFG() const { return false; }

The problem is LibraryCallKit::wrapWithVectorBox() uses control produced 
by freshly allocated VectorBoxNode. So, other nodes can use it later as 
a control input and it breaks different assumptions in the compiler.

Razvan, what was the motivation to mark VectorBoxNode as non-CFG in the 
first place?

Best regards,
Vladimir Ivanov

[1]
#  Internal Error 
(/Users/vlivanov/ws/jdk/panama/hotspot/src/share/vm/opto/phaseX.cpp:846), 
pid=20349, tid=22019
#  assert(d->is_CFG() && n->is_CFG()) failed: must have CFG nodes

PhaseGVN::is_dominator_helper(Node*, Node*, bool)+0xc0
PhaseIterGVN::is_dominator(Node*, Node*)+0x32
ConstraintCastNode::dominating_cast(PhaseTransform*) const+0x1ef
CheckCastPPNode::Identity(PhaseGVN*)+0x27
PhaseIterGVN::transform_old(Node*)+0x5df
PhaseIterGVN::optimize()+0x14e
Compile::inline_incrementally(PhaseIterGVN&)+0x274
Compile::Optimize()+0x1bc
...

[2]
#  Internal Error 
(/Users/vlivanov/ws/jdk/panama/hotspot/src/share/vm/opto/loopnode.cpp:3078), 
pid=21680, tid=22019
#  assert(!is_visited) failed: visit only once

PhaseIdealLoop::build_loop_early(VectorSet&, Node_List&, Node_Stack&)+0x349
PhaseIdealLoop::build_and_optimize(bool, bool)+0x7e1
PhaseIdealLoop::PhaseIdealLoop(PhaseIterGVN&, bool, bool)+0xc0
PhaseIdealLoop::PhaseIdealLoop(PhaseIterGVN&, bool, bool)+0x43
Compile::Optimize()+0x7ed
...


More information about the panama-dev mailing list