7077439: Possible reference through NULL in loopPredicate.cpp:726

Use cl->is_valid_counted_loop() check.

Reviewed-by: never
This commit is contained in:
Vladimir Kozlov 2011-08-10 14:06:57 -07:00
parent b543a07b9a
commit 52f678435a
4 changed files with 9 additions and 7 deletions

View file

@ -718,7 +718,7 @@ bool PhaseIdealLoop::loop_predication_impl(IdealLoopTree *loop) {
}
CountedLoopNode *cl = NULL;
if (head->is_CountedLoop()) {
if (head->is_valid_counted_loop()) {
cl = head->as_CountedLoop();
// do nothing for iteration-splitted loops
if (!cl->is_normal_loop()) return false;