< prev index next >
src/hotspot/share/opto/loopnode.cpp
Print this page
rev 48500 : 8194988: 8 Null pointer dereference defect groups related to MultiNode::proj_out()
@@ -68,13 +68,13 @@
bool LoopNode::is_valid_counted_loop() const {
if (is_CountedLoop()) {
CountedLoopNode* l = as_CountedLoop();
CountedLoopEndNode* le = l->loopexit();
if (le != NULL &&
- le->proj_out(1 /* true */) == l->in(LoopNode::LoopBackControl)) {
+ le->proj_out_or_null(1 /* true */) == l->in(LoopNode::LoopBackControl)) {
Node* phi = l->phi();
- Node* exit = le->proj_out(0 /* false */);
+ Node* exit = le->proj_out_or_null(0 /* false */);
if (exit != NULL && exit->Opcode() == Op_IfFalse &&
phi != NULL && phi->is_Phi() &&
phi->in(LoopNode::LoopBackControl) == l->incr() &&
le->loopnode() == l && le->stride_is_con()) {
return true;
@@ -1214,11 +1214,11 @@
IfFalseNode* OuterStripMinedLoopNode::outer_loop_exit() const {
IfNode* le = outer_loop_end();
if (le == NULL) {
return NULL;
}
- Node* c = le->proj_out(false);
+ Node* c = le->proj_out_or_null(false);
if (c == NULL) {
return NULL;
}
return c->as_IfFalse();
}
< prev index next >