changeset 13453:31c842513336

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
author thartmann
date Mon, 22 May 2017 09:23:59 +0200
parents 286c8e80795b
children 79f53d722d58
files src/share/vm/opto/memnode.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/opto/memnode.cpp	Mon May 22 09:18:12 2017 +0200
+++ b/src/share/vm/opto/memnode.cpp	Mon May 22 09:23:59 2017 +0200
@@ -1123,6 +1123,9 @@
       // 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();