From af675702bc533bea3ef4b1f76be6f40871ec08bf Mon Sep 17 00:00:00 2001 From: thartmann Date: Mon, 22 May 2017 09:23:59 +0200 Subject: [PATCH] 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 --- src/share/vm/opto/memnode.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/share/vm/opto/memnode.cpp b/src/share/vm/opto/memnode.cpp index 56a11f0db..2cfbae65b 100644 --- a/src/share/vm/opto/memnode.cpp +++ b/src/share/vm/opto/memnode.cpp @@ -1156,6 +1156,9 @@ Node *LoadNode::Identity( PhaseTransform *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(); -- GitLab