diff src/share/vm/opto/superword.cpp @ 3850:6987871cfb9b

7077439: Possible reference through NULL in loopPredicate.cpp:726 Summary: Use cl->is_valid_counted_loop() check. Reviewed-by: never
author kvn
date Wed, 10 Aug 2011 14:06:57 -0700
parents c7b60b601eb4
children dc682d9431f3
line wrap: on
line diff
--- a/src/share/vm/opto/superword.cpp	Tue Aug 02 18:36:40 2011 +0200
+++ b/src/share/vm/opto/superword.cpp	Wed Aug 10 14:06:57 2011 -0700
@@ -70,6 +70,8 @@
   assert(lpt->_head->is_CountedLoop(), "must be");
   CountedLoopNode *cl = lpt->_head->as_CountedLoop();
 
+  if (!cl->is_valid_counted_loop()) return; // skip malformed counted loop
+
   if (!cl->is_main_loop() ) return; // skip normal, pre, and post loops
 
   // Check for no control flow in body (other than exit)