< prev index next >

src/hotspot/share/opto/callnode.cpp

Print this page
rev 48500 : 8194988: 8 Null pointer dereference defect groups related to MultiNode::proj_out()

*** 770,780 **** } if (t_oop->is_ptr_to_boxed_value()) { ciKlass* boxing_klass = t_oop->klass(); if (is_CallStaticJava() && as_CallStaticJava()->is_boxing_method()) { // Skip unrelated boxing methods. ! Node* proj = proj_out(TypeFunc::Parms); if ((proj == NULL) || (phase->type(proj)->is_instptr()->klass() != boxing_klass)) { return false; } } if (is_CallJava() && as_CallJava()->method() != NULL) { --- 770,780 ---- } if (t_oop->is_ptr_to_boxed_value()) { ciKlass* boxing_klass = t_oop->klass(); if (is_CallStaticJava() && as_CallStaticJava()->is_boxing_method()) { // Skip unrelated boxing methods. ! Node* proj = proj_out_or_null(TypeFunc::Parms); if ((proj == NULL) || (phase->type(proj)->is_instptr()->klass() != boxing_klass)) { return false; } } if (is_CallJava() && as_CallJava()->method() != NULL) {
*** 782,792 **** if (meth->is_getter()) { return false; } // May modify (by reflection) if an boxing object is passed // as argument or returned. ! 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))) { return true; --- 782,792 ---- if (meth->is_getter()) { return false; } // May modify (by reflection) if an boxing object is passed // as argument or returned. ! Node* proj = returns_pointer() ? proj_out_or_null(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))) { return true;
*** 822,832 **** // or 'this' if there are several CheckCastPP or unexpected uses // or returns NULL if there is no one. Node *CallNode::result_cast() { Node *cast = NULL; ! Node *p = proj_out(TypeFunc::Parms); if (p == NULL) return NULL; for (DUIterator_Fast imax, i = p->fast_outs(imax); i < imax; i++) { Node *use = p->fast_out(i); --- 822,832 ---- // or 'this' if there are several CheckCastPP or unexpected uses // or returns NULL if there is no one. Node *CallNode::result_cast() { Node *cast = NULL; ! Node *p = proj_out_or_null(TypeFunc::Parms); if (p == NULL) return NULL; for (DUIterator_Fast imax, i = p->fast_outs(imax); i < imax; i++) { Node *use = p->fast_out(i);
*** 1376,1392 **** if (type->isa_int() && type->is_int()->_hi < 0) { if (can_reshape) { PhaseIterGVN *igvn = phase->is_IterGVN(); // Unreachable fall through path (negative array length), // the allocation can only throw so disconnect it. ! Node* proj = proj_out(TypeFunc::Control); Node* catchproj = NULL; if (proj != NULL) { for (DUIterator_Fast imax, i = proj->fast_outs(imax); i < imax; i++) { Node *cn = proj->fast_out(i); if (cn->is_Catch()) { ! catchproj = cn->as_Multi()->proj_out(CatchProjNode::fall_through_index); break; } } } if (catchproj != NULL && catchproj->outcnt() > 0 && --- 1376,1392 ---- if (type->isa_int() && type->is_int()->_hi < 0) { if (can_reshape) { PhaseIterGVN *igvn = phase->is_IterGVN(); // Unreachable fall through path (negative array length), // the allocation can only throw so disconnect it. ! Node* proj = proj_out_or_null(TypeFunc::Control); Node* catchproj = NULL; if (proj != NULL) { for (DUIterator_Fast imax, i = proj->fast_outs(imax); i < imax; i++) { Node *cn = proj->fast_out(i); if (cn->is_Catch()) { ! catchproj = cn->as_Multi()->proj_out_or_null(CatchProjNode::fall_through_index); break; } } } if (catchproj != NULL && catchproj->outcnt() > 0 &&
*** 1440,1450 **** // Return NULL if new nodes are not allowed if (!allow_new_nodes) return NULL; // Create a cast which is control dependent on the initialization to // propagate the fact that the array length must be positive. length = new CastIINode(length, narrow_length_type); ! length->set_req(0, initialization()->proj_out(0)); } } return length; } --- 1440,1450 ---- // Return NULL if new nodes are not allowed if (!allow_new_nodes) return NULL; // Create a cast which is control dependent on the initialization to // propagate the fact that the array length must be positive. length = new CastIINode(length, narrow_length_type); ! length->set_req(0, initialization()->proj_out_or_null(0)); } } return length; }
< prev index next >