[Soot-list] Split units in Jimple / missing equals-implementation
Eric Bodden
eric.bodden at mail.mcgill.ca
Sun Feb 12 11:38:03 EST 2006
Hi.
This week I implemented a "must reaching definitions" analysis, i.e. a
definition os reachable from a use when it is reachable on *all* paths.
Strangely, this analysis missed the following case:
int j;
try {
j=3;
} catch(Throwable t) {
j=4;
} finally {
j=5;
}
//why is j here not 5 FOR SURE?
System.out.println(j); //(1)
Actually, the definition for j has definetely one unambigous reachable
definition: j=5. However, Soot splits this definition into multiple ones
in the exceptional unit graph. Since AssignStmt also does not implement
hashcode/equals, the intersection at line (1) fails, i.e. throws the
information j=5 away.
So am I missing something or is there something wrong?
I would suggest to fix this somehow, in one of the two following ways:
1.) Prevent ExceptionalUnitGraph from creating multiple different units
for entities that used to be the same on the source/bytecode level (i.e.
share them).
2.) Implement hashcode/equals on units.
Maybe both should be done.
Does this make sense?
Eric
--
Eric Bodden
Sable Research Group, McGill University
Montreal, Canada
More information about the Soot-list
mailing list