[Soot-list] DeadAssignmentEliminator and assignments x=null

Eric Bodden eric.bodden at mail.mcgill.ca
Tue Sep 11 16:54:41 EDT 2007


> I don't think it's wrong to mark x=null as essential, but I don't think
> it's bad to leave it as it is either. I'll leave it up to you.

Point is that the current behavior forbids test cases like this:

Object o = new Object();
WeakReference w = new WeakReference(o);
o = null; //eliminated
System.gc();
assert w.get()==null; //will fail

Eric

-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada


More information about the Soot-list mailing list