8066775: opto/node.hpp:355, assert(i < _max) failed: oob: i=1, _max=1
authorroland
Fri, 05 Dec 2014 18:03:15 +0100
changeset 28041 fed7f90dc4c4
parent 28040 e68bdf210a7e
child 28043 59286db74db6
8066775: opto/node.hpp:355, assert(i < _max) failed: oob: i=1, _max=1 Summary: bad assumption on graph shape in CastIINode::Value if that part of the graph is becoming dead. Reviewed-by: kvn
hotspot/src/share/vm/opto/castnode.cpp
--- a/hotspot/src/share/vm/opto/castnode.cpp	Mon Dec 08 18:21:02 2014 +0300
+++ b/hotspot/src/share/vm/opto/castnode.cpp	Fri Dec 05 18:03:15 2014 +0100
@@ -104,7 +104,8 @@
   // Try to improve the type of the CastII if we recognize a CmpI/If
   // pattern.
   if (_carry_dependency) {
-    if (in(0) != NULL && (in(0)->is_IfFalse() || in(0)->is_IfTrue())) {
+    if (in(0) != NULL && in(0)->in(0) != NULL && in(0)->in(0)->is_If()) {
+      assert(in(0)->is_IfFalse() || in(0)->is_IfTrue(), "should be If proj");
       Node* proj = in(0);
       if (proj->in(0)->in(1)->is_Bool()) {
         Node* b = proj->in(0)->in(1);