changeset 48990:23a07b0cf8a6

8194987: Null pointer dereference in escape.cpp related to Node::find_out_with() Reviewed-by: kvn
author dlong
date Wed, 31 Jan 2018 16:09:52 -0800
parents c866eaca24cb
children e50e326a2bfc
files src/hotspot/share/opto/escape.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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