[Soot-list] variable name conflict

Bodden, Eric eric.bodden at sit.fraunhofer.de
Tue Jul 16 10:24:53 EDT 2013


Hello.

> On another note. I found this problem occurs if I go from java to jimple. However, the actual scenario in my case will be going from dex to jimple. So, I decided to create a simple android app in which one method recreates the problem of variables with same name in different blocks. I exported it as an apk, and then used my tool to unpack the apk and generate jimple files for it. I found the problem went away, because variable names now are different. This is the jimple code I got:
> 
>    public void testDeclarations(boolean)
> 
>     {
> 
>         com.example.myfirstandroidapp.MyActivity $r0;
> 
>         boolean $z0;
> 
>         java.lang.String $r1;
> 
>         java.lang.StringBuilder $r2;
> 
>         java.io.PrintStream $r3;
> 
>         char $c0;
> 
>         int $i1;
> 
> ...
> 
> 
> So, it seems this might not be an as problematic issue as I thought.

It depends. Was your app compiled with debug symbols? If I am not mistaken then Soot should also assign original variable names in this case, but for some reasons this does not seem to be happening in your setup.

Anyway, Soot currently does nothing to assure non-clashing variable names when it prints .jimple files, but it could be extended to do so.

Best wishes,
Eric


More information about the Soot-list mailing list