[Soot-list] a small bug in PDG
lpxz
lpxz at ust.hk
Sat Jun 30 12:06:02 EDT 2012
Hi, guys,
In HashMutablePDG class, the getDependents method should only return
the dependents, but the implementation returns all successors, a
superset of the dependents. An extra check is needed to fix the bug, as
follows.
public List<PDGNode> getDependents(PDGNode node)
{
//return this.getSuccsOf(node);// wrong! auxiliary edges exist.
List<PDGNode> toret = new ArrayList<PDGNode>();//memory issue
for(Object succ:this.getSuccsOf(node))
{
PDGNode succPDGN = (PDGNode)succ;
if(this.dependentOn(succPDGN, node))
{
toret.add(succPDGN);
}
}
return toret;
}
Regards
Peng
More information about the Soot-list
mailing list