8194987: Null pointer dereference in escape.cpp related to Node::find_out_with()
authordlong
Wed, 31 Jan 2018 16:09:52 -0800
changeset 48857 23a07b0cf8a6
parent 48856 c866eaca24cb
child 48858 e50e326a2bfc
8194987: Null pointer dereference in escape.cpp related to Node::find_out_with() Reviewed-by: kvn
src/hotspot/share/opto/escape.cpp
--- a/src/hotspot/share/opto/escape.cpp	Wed Jan 31 16:09:29 2018 -0800
+++ b/src/hotspot/share/opto/escape.cpp	Wed Jan 31 16:09:52 2018 -0800
@@ -3226,7 +3226,7 @@
                n->Opcode() == Op_EncodeISOArray) {
       // get the memory projection
       n = n->find_out_with(Op_SCMemProj);
-      assert(n->Opcode() == Op_SCMemProj, "memory projection required");
+      assert(n != NULL && n->Opcode() == Op_SCMemProj, "memory projection required");
     } else {
       assert(n->is_Mem(), "memory node required.");
       Node *addr = n->in(MemNode::Address);
@@ -3250,7 +3250,7 @@
       } else if (n->is_LoadStore()) {
         // get the memory projection
         n = n->find_out_with(Op_SCMemProj);
-        assert(n->Opcode() == Op_SCMemProj, "memory projection required");
+        assert(n != NULL && n->Opcode() == Op_SCMemProj, "memory projection required");
       }
     }
     // push user on appropriate worklist