bug fix for allowing out-of-contexts taints to flow across in-context task exit
authorjjenista <jjenista>
Mon, 26 Jul 2010 22:13:35 +0000 (22:13 +0000)
committerjjenista <jjenista>
Mon, 26 Jul 2010 22:13:35 +0000 (22:13 +0000)
Robust/src/Analysis/Disjoint/Canonical.java
Robust/src/Analysis/Disjoint/ReachGraph.java

index 74faebb6e18448a3f254579cd9a53d1858577875..291f424cf52ea6714d2fb7de274b2f0b5ad7fdc9 100644 (file)
@@ -1450,8 +1450,8 @@ abstract public class Canonical {
   // BOO, HISS! SESE (rblock) operand does NOT extend
   // Canonical, so we can't cache this op by its
   // canonical arguments--THINK ABOUT A BETTER WAY!
-  public static TaintSet removeTaintsBy( TaintSet          ts,
-                                         FlatSESEEnterNode sese ) {
+  public static TaintSet removeInContextTaints( TaintSet          ts,
+                                                FlatSESEEnterNode sese ) {
     assert ts != null;
     assert ts.isCanonical();
     assert sese != null;
@@ -1463,7 +1463,14 @@ abstract public class Canonical {
     while( tItr.hasNext() ) {
       Taint t = tItr.next();
 
-      if( t.getSESE() == null || !t.getSESE().equals( sese ) ) {
+      // what is allowed through?  stall site taints always
+      // go through, anything where rblock doesn't match is
+      // unaffected, and if the taint has a non-empty predicate
+      // it is out of context so it should go through, too
+      if( t.getSESE() == null ||
+          !t.getSESE().equals( sese ) ||
+          !t.getPreds().isEmpty()
+          ) {
         out.taints.add( t );
       }
     }
index 7794af4a01bccb851fce57f34d108430658534d6..fee219b41af5022714a20c5ffce99b740bd94eb5 100644 (file)
@@ -244,15 +244,6 @@ public class ReachGraph {
        
     referencer.removeReferencee( edge );
     referencee.removeReferencer( edge );
-
-    // TODO
-
-//    int oldTaint=edge.getTaintIdentifier();
-//    if(referencer instanceof HeapRegionNode){
-//     depropagateTaintIdentifier((HeapRegionNode)referencer,oldTaint,new HashSet<HeapRegionNode>());
-//    }
-
-
   }
 
   // return whether at least one edge was removed
@@ -1361,9 +1352,9 @@ public class ReachGraph {
       while( reItr.hasNext() ) {
         RefEdge re = reItr.next();
 
-        re.setTaints( Canonical.removeTaintsBy( re.getTaints(),
-                                                sese
-                                                )
+        re.setTaints( Canonical.removeInContextTaints( re.getTaints(),
+                                                       sese
+                                                       )
                       );
       }
     }