8197931: Null pointer dereference in Unique_Node_List::push of node.hpp:1510
authorroland
Tue, 20 Mar 2018 15:38:00 +0100
changeset 49600 d7c83c8e4e65
parent 49599 6b9be5bfa167
child 49601 bfc70d5d291a
8197931: Null pointer dereference in Unique_Node_List::push of node.hpp:1510 Reviewed-by: dlong, thartmann
src/hotspot/share/opto/loopTransform.cpp
--- a/src/hotspot/share/opto/loopTransform.cpp	Fri Mar 23 16:25:47 2018 +0100
+++ b/src/hotspot/share/opto/loopTransform.cpp	Tue Mar 20 15:38:00 2018 +0100
@@ -70,11 +70,20 @@
   // put body of outer strip mined loop on igvn work list as well
   if (_head->is_CountedLoop() && _head->as_Loop()->is_strip_mined()) {
     CountedLoopNode* l = _head->as_CountedLoop();
-    _phase->_igvn._worklist.push(l->outer_loop());
-    _phase->_igvn._worklist.push(l->outer_loop_tail());
-    _phase->_igvn._worklist.push(l->outer_loop_end());
-    _phase->_igvn._worklist.push(l->outer_safepoint());
+    Node* outer_loop = l->outer_loop();
+    assert(outer_loop != NULL, "missing piece of strip mined loop");
+    _phase->_igvn._worklist.push(outer_loop);
+    Node* outer_loop_tail = l->outer_loop_tail();
+    assert(outer_loop_tail != NULL, "missing piece of strip mined loop");
+    _phase->_igvn._worklist.push(outer_loop_tail);
+    Node* outer_loop_end = l->outer_loop_end();
+    assert(outer_loop_end != NULL, "missing piece of strip mined loop");
+    _phase->_igvn._worklist.push(outer_loop_end);
+    Node* outer_safepoint = l->outer_safepoint();
+    assert(outer_safepoint != NULL, "missing piece of strip mined loop");
+    _phase->_igvn._worklist.push(outer_safepoint);
     Node* cle_out = _head->as_CountedLoop()->loopexit()->proj_out(false);
+    assert(cle_out != NULL, "missing piece of strip mined loop");
     _phase->_igvn._worklist.push(cle_out);
   }
 }