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

Fixed a missing null check on the return value of AddPNode::Ideal_base_and_offset() found by Parfait.

Reviewed-by: kvn
This commit is contained in:
Tobias Hartmann 2017-05-22 09:23:59 +02:00
parent 4b93f11738
commit d3baf34118

@ -1123,6 +1123,9 @@ Node* LoadNode::Identity(PhaseGVN* phase) {
// Use _idx of address base (could be Phi node) for boxed values.
intptr_t ignore = 0;
Node* base = AddPNode::Ideal_base_and_offset(in(Address), phase, ignore);
if (base == NULL) {
return this;
}
this_iid = base->_idx;
}
const Type* this_type = bottom_type();