[Soot-list] one question about a mismatch between Jimple- and Java-representation

Saswat Anand saswat78 at gmail.com
Fri Aug 19 23:59:40 EDT 2011


> public class TestcaseForSoot2 {
> int myint;
>
> void Method1(TestcaseForSoot2 a,TestcaseForSoot2 b){
> TestcaseForSoot2 x=new TestcaseForSoot2();
>    x.myint=5;
>    a=x;
>
> }

> semantic meaning of Method1() between Java and Jimple is different. In Java,
> it says the first parameter "a" is pointing to a newly created object "x",
> and then it further implies that the "x" escapes from Method1(); in Jimple,

I am not sure why you say "x" escapes from Method1. Do you think if
you print a.myint in the caller after Method1 returns, it will print 5
(i.e., the value that is assigned inside Method1)? To me it seems like
your suspicion about a possible bug in Soot is related to this.

Saswat


More information about the Soot-list mailing list