// 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;
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 );
}
}
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
while( reItr.hasNext() ) {
RefEdge re = reItr.next();
- re.setTaints( Canonical.removeTaintsBy( re.getTaints(),
- sese
- )
+ re.setTaints( Canonical.removeInContextTaints( re.getTaints(),
+ sese
+ )
);
}
}