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

Patrick Lam plam at sable.mcgill.ca
Fri Aug 19 22:58:30 EDT 2011


On 08/19/11 22:42, jiangfan shi wrote:
> My question is about a line "r5 = r4;" with red color and with a label
> "Problem line" shown above. I think it should be "r1=r4". Otherwise the
> 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, it says one local reference variable "r5" is
> pointing to a newly created object "x", and it says nothing about the
> parameter "a" and then the implied "escape" meaning.

Please provide code that actually does something with the "a" variable. 
Your example doesn't actually do anything with "a" or "x" after setting 
a=x, so it's impossible to tell what would happen after that. Soot often 
seems to do things that are counterintuitive, but actually work out to 
be fine.

In any case, Soot is not going to let you really write to the parameter, 
so my guess is that it's going to change all subsequent accesses to "a" 
into accesses to a copy of "a".

pat


More information about the Soot-list mailing list