mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
7077439: Possible reference through NULL in loopPredicate.cpp:726
Use cl->is_valid_counted_loop() check. Reviewed-by: never
This commit is contained in:
parent
b543a07b9a
commit
52f678435a
4 changed files with 9 additions and 7 deletions
|
@ -689,6 +689,7 @@ bool PhaseIdealLoop::is_counted_loop( Node *x, IdealLoopTree *loop ) {
|
|||
Node* PhaseIdealLoop::exact_limit( IdealLoopTree *loop ) {
|
||||
assert(loop->_head->is_CountedLoop(), "");
|
||||
CountedLoopNode *cl = loop->_head->as_CountedLoop();
|
||||
assert(cl->is_valid_counted_loop(), "");
|
||||
|
||||
if (!LoopLimitCheck || ABS(cl->stride_con()) == 1 ||
|
||||
cl->limit()->Opcode() == Op_LoopLimit) {
|
||||
|
@ -1608,14 +1609,13 @@ bool PhaseIdealLoop::is_deleteable_safept(Node* sfpt) {
|
|||
void PhaseIdealLoop::replace_parallel_iv(IdealLoopTree *loop) {
|
||||
assert(loop->_head->is_CountedLoop(), "");
|
||||
CountedLoopNode *cl = loop->_head->as_CountedLoop();
|
||||
if (!cl->is_valid_counted_loop())
|
||||
return; // skip malformed counted loop
|
||||
Node *incr = cl->incr();
|
||||
if (incr == NULL)
|
||||
return; // Dead loop?
|
||||
Node *init = cl->init_trip();
|
||||
Node *phi = cl->phi();
|
||||
// protect against stride not being a constant
|
||||
if (!cl->stride_is_con())
|
||||
return;
|
||||
int stride_con = cl->stride_con();
|
||||
|
||||
PhaseGVN *gvn = &_igvn;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue