Author: meiye
Date: 2011-05-23 20:24:38 -0400 (Mon, 23 May 2011)
New Revision: 3623

Modified:
   trunk/osprey/be/opt/opt_proactive.cxx
Log:
 avoid using list iterator to prevent access to deleted SC nodes and etc.  CR: 
Sun Chan

Modified: trunk/osprey/be/opt/opt_proactive.cxx
===================================================================
--- trunk/osprey/be/opt/opt_proactive.cxx       2011-05-24 00:23:22 UTC (rev 
3622)
+++ trunk/osprey/be/opt/opt_proactive.cxx       2011-05-24 00:24:38 UTC (rev 
3623)
@@ -5828,15 +5828,16 @@
     _local_stack->Push(sc);
   }
 
-  SC_NODE * child;
-  SC_LIST_ITER sc_iter;
-
-  FOR_ALL_ELEM(child, sc_iter, Init(sc->Kids())) {
+  SC_NODE * child = sc->First_kid();
+  SC_NODE * next;
+  while (child) {
+    next = child->Next_sibling();
     if (Top_down_trans(child)) {
       return FALSE;
     }
+    child = next;
   }
-
+  
   BOOL do_restart = FALSE;
 
   if (sc->Type() == SC_LOOP) {


------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to