--- old/src/share/vm/opto/callnode.cpp 2017-03-08 22:49:11.241650244 -0800 +++ new/src/share/vm/opto/callnode.cpp 2017-03-08 22:49:11.112638593 -0800 @@ -784,8 +784,8 @@ } // May modify (by reflection) if an boxing object is passed // as argument or returned. - if (returns_pointer() && (proj_out(TypeFunc::Parms) != NULL)) { - Node* proj = proj_out(TypeFunc::Parms); + Node* proj = returns_pointer() ? proj_out(TypeFunc::Parms) : NULL; + if (proj != NULL) { const TypeInstPtr* inst_t = phase->type(proj)->isa_instptr(); if ((inst_t != NULL) && (!inst_t->klass_is_exact() || (inst_t->klass() == boxing_klass))) { --- old/src/share/vm/opto/ifnode.cpp 2017-03-08 22:49:11.796700372 -0800 +++ new/src/share/vm/opto/ifnode.cpp 2017-03-08 22:49:11.638686101 -0800 @@ -1458,8 +1458,9 @@ // be skipped. For example, range check predicate has two checks // for lower and upper bounds. ProjNode* unc_proj = proj_out(1 - prev_dom->as_Proj()->_con)->as_Proj(); - if (unc_proj->is_uncommon_trap_proj(Deoptimization::Reason_predicate) != NULL) - prev_dom = idom; + if ((unc_proj != NULL) && (unc_proj->is_uncommon_trap_proj(Deoptimization::Reason_predicate) != NULL)) { + prev_dom = idom; + } // Now walk the current IfNode's projections. // Loop ends when 'this' has no more uses. --- old/src/share/vm/opto/loopTransform.cpp 2017-03-08 22:49:12.323747970 -0800 +++ new/src/share/vm/opto/loopTransform.cpp 2017-03-08 22:49:12.177734784 -0800 @@ -3174,6 +3174,11 @@ return false; } + Node* exit = head->loopexit()->proj_out(0); + if (exit == NULL) { + return false; + } + #ifndef PRODUCT if (TraceLoopOpts) { tty->print("ArrayFill "); @@ -3281,7 +3286,6 @@ */ // Redirect the old control and memory edges that are outside the loop. - Node* exit = head->loopexit()->proj_out(0); // Sometimes the memory phi of the head is used as the outgoing // state of the loop. It's safe in this case to replace it with the // result_mem. --- old/src/share/vm/opto/stringopts.cpp 2017-03-08 22:49:12.838794485 -0800 +++ new/src/share/vm/opto/stringopts.cpp 2017-03-08 22:49:12.678780034 -0800 @@ -891,8 +891,9 @@ ctrl_path.push(cn); ctrl_path.push(cn->proj_out(0)); ctrl_path.push(cn->proj_out(0)->unique_out()); - if (cn->proj_out(0)->unique_out()->as_Catch()->proj_out(0) != NULL) { - ctrl_path.push(cn->proj_out(0)->unique_out()->as_Catch()->proj_out(0)); + Node* catchproj = cn->proj_out(0)->unique_out()->as_Catch()->proj_out(0); + if (catchproj != NULL) { + ctrl_path.push(catchproj); } } else { ShouldNotReachHere();