[Soot-list] Bug in ArrayPackedSet.equals()

Karthik reachsrk at gmail.com
Tue Sep 27 02:45:53 EDT 2011


Hi,

I have been working with a BackwardFlowAnalysis that I have implemented, and
it doesn't work for programs which have loops i.e. the ones that require
more than one iteration of backward analysis. The BackwardFlowAnalysis does
a

if(*!beforeFlow.equals(previousBeforeFlow)*) {
    ... add to changedUnits...
}


The code for ArrayPackedSet equals method as of soot 2.4 release is

    public boolean equals(Object otherFlow)
    {
      if (sameType(otherFlow)) {
        for (int element : bits)
*            if(element != element)*
                return false;

        return true;
      } else
        return super.equals(otherFlow);
    }

As can be seen, this trivially returns true for all otherFlow objects of the
sameType().
This is true as of soot 2.4 as well as trunk.


Karthik Ramachandra
IIT Bombay.
http://www.cse.iitb.ac.in/~karthiksr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20110927/bccd5b52/attachment.html 


More information about the Soot-list mailing list