Mon, 22 May 2017 09:23:59 +0200
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 | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/opto/memnode.cpp Mon May 22 09:18:12 2017 +0200 1.2 +++ b/src/share/vm/opto/memnode.cpp Mon May 22 09:23:59 2017 +0200 1.3 @@ -1156,6 +1156,9 @@ 1.4 // Use _idx of address base (could be Phi node) for boxed values. 1.5 intptr_t ignore = 0; 1.6 Node* base = AddPNode::Ideal_base_and_offset(in(Address), phase, ignore); 1.7 + if (base == NULL) { 1.8 + return this; 1.9 + } 1.10 this_iid = base->_idx; 1.11 } 1.12 const Type* this_type = bottom_type();