提交 af675702 编写于 作者: T thartmann

8180575: Null pointer dereference in LoadNode::Identity()

Summary: Fixed a missing null check on the return value of AddPNode::Ideal_base_and_offset() found by Parfait.
Reviewed-by: kvn
上级 4f8e2c59
...@@ -1156,6 +1156,9 @@ Node *LoadNode::Identity( PhaseTransform *phase ) { ...@@ -1156,6 +1156,9 @@ Node *LoadNode::Identity( PhaseTransform *phase ) {
// Use _idx of address base (could be Phi node) for boxed values. // Use _idx of address base (could be Phi node) for boxed values.
intptr_t ignore = 0; intptr_t ignore = 0;
Node* base = AddPNode::Ideal_base_and_offset(in(Address), phase, ignore); Node* base = AddPNode::Ideal_base_and_offset(in(Address), phase, ignore);
if (base == NULL) {
return this;
}
this_iid = base->_idx; this_iid = base->_idx;
} }
const Type* this_type = bottom_type(); const Type* this_type = bottom_type();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册