[Soot-list] my StrongLocalMustAliasAnalysis gives unexpected results
Patrick Lam
p.lam at ece.uwaterloo.ca
Sat Oct 20 22:23:53 EDT 2012
On 10/20/2012 01:10 PM, Zhoulai wrote:
> Hi, Eric,
>
> The following test-case is much more realistic
> ****************
> 1: static void test5(int i){
> 2: while (i>0){
> 3: A x = new A();
> 4: A y = x;
> 5: String s = "hello";
> }
> }
> **************
>
> Using the original strong must-alias analysis, the results before the
> line "string s = "hello"" show that 'x', 'y' are both bound to 1, which
> should be unsound. (see the highlighted line of the new attached
> screenshot ).
>
> What do you think?
I don't get it. Why is that unsound? We know exactly what x points to.
It points to the object you just allocated at line 3 (on each iteration
of the loop); other objects no longer exist. Then y points to the same
object as x. I don't see a problem at line 5.
pat
More information about the Soot-list
mailing list