From 3bbb9e92534aa3e4329001aebeff183d47b9bbe2 Mon Sep 17 00:00:00 2001 From: jjenista Date: Mon, 26 Jul 2010 22:13:35 +0000 Subject: [PATCH] bug fix for allowing out-of-contexts taints to flow across in-context task exit --- Robust/src/Analysis/Disjoint/Canonical.java | 13 ++++++++++--- Robust/src/Analysis/Disjoint/ReachGraph.java | 15 +++------------ 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Robust/src/Analysis/Disjoint/Canonical.java b/Robust/src/Analysis/Disjoint/Canonical.java index 74faebb6..291f424c 100644 --- a/Robust/src/Analysis/Disjoint/Canonical.java +++ b/Robust/src/Analysis/Disjoint/Canonical.java @@ -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 ); } } diff --git a/Robust/src/Analysis/Disjoint/ReachGraph.java b/Robust/src/Analysis/Disjoint/ReachGraph.java index 7794af4a..fee219b4 100644 --- a/Robust/src/Analysis/Disjoint/ReachGraph.java +++ b/Robust/src/Analysis/Disjoint/ReachGraph.java @@ -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()); -// } - - } // 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 + ) ); } } -- 2.34.1