public static final int NEW=16;
public String toString() {
+ String taintlist="";
+ if (taints!=null)
+ taintlist=", "+taints.toString();
if (srcvar!=null)
- return "<"+srcvar+", "+dst+">";
+ return "<"+srcvar+", "+dst+taintlist+">";
else if (fd!=null)
- return "<"+src+", "+statuspredicate+", "+fd+", "+dst+ ">";
+ return "<"+src+", "+statuspredicate+", "+fd+", "+dst+taintlist+ ">";
else
- return "<"+src+", "+statuspredicate+", [], "+dst+">";
+ return "<"+src+", "+statuspredicate+", [], "+dst+taintlist+">";
}
public static int mergeStatus(int stat1, int stat2) {
if (newe.taints==null)
newe.taints=e.taints;
else
- newe.taints=newe.taints.merge(taints);
+ newe.taints=newe.taints.merge(e.taints);
}
return newe;
}
if (delta.getInit()) {
removeInitTaints(null, delta, graph);
for (TempDescriptor tmp:sese.getInVarSet()) {
+ System.out.println("TMP variable:"+tmp);
Taint taint=Taint.factory(sese, null, tmp, AllocFactory.dummyNode, sese, ReachGraph.predsEmpty);
MySet<Edge> edges=GraphManip.getEdges(graph, delta, tmp);
for(Edge e:edges) {
Edge newe=e.addTaint(taint);
delta.addVarEdge(newe);
+ System.out.println("Adding Edge:"+newe);
}
}
} else {
removeDiffTaints(null, delta);
for (TempDescriptor tmp:sese.getInVarSet()) {
+ System.out.println("TMP variable:"+tmp);
Taint taint=Taint.factory(sese, null, tmp, AllocFactory.dummyNode, sese, ReachGraph.predsEmpty);
MySet<Edge> edges=GraphManip.getDiffEdges(delta, tmp);
for(Edge e:edges) {
Edge newe=e.addTaint(taint);
delta.addVarEdge(newe);
+ System.out.println("DAdding Edge:"+newe);
}
}
}
private boolean isRecursive(FlatSESEEnterNode sese) {
MethodDescriptor md=sese.getmdEnclosing();
- return callGraph.getCalleeSet(md).contains(md);
+ boolean isrecursive=callGraph.getCalleeSet(md).contains(md);
+ return isrecursive;
}
Delta processSESEExitNode(FlatSESEExitNode seseexit, Delta delta, Graph graph) {
FlatSESEEnterNode sese=seseexit.getFlatEnter();
//Strip Taints from this SESE
if (delta.getInit()) {
- removeInitTaints(isRecursive(sese)?sese:null, delta, graph);
+ removeInitTaints(isRecursive(sese)?null:sese, delta, graph);
} else {
- removeDiffTaints(isRecursive(sese)?sese:null, delta);
+ removeDiffTaints(isRecursive(sese)?null:sese, delta);
}
applyDiffs(graph, delta);
return delta;
for(Map.Entry<TempDescriptor, MySet<Edge>> e: delta.varedgeadd.entrySet()) {
TempDescriptor tmp=e.getKey();
MySet<Edge> edgestoadd=e.getValue();
+ System.out.println("ADDING:"+edgestoadd);
if (graph.varMap.containsKey(tmp)) {
Edge.mergeEdgesInto(graph.varMap.get(tmp), edgestoadd);
} else