[Soot-list] Bug in shimple transformation ?

Navindra Umanee navindra at cs.mcgill.ca
Thu Oct 20 12:24:39 EDT 2005


Hi Guillaume,

So sorry for the delay.  I have tracked this down to a problem with
the GuaranteedDefs analysis that Shimple uses.  I'll look into fixing
or re-implementing GuaranteedDefs later tonight.

Thanks,
Navin.

Guillaume Salagnac <guillaume.salagnac at imag.fr> wrote:
> I use Soot to perform some pointer analyses on programs in Shimple 
> (SSA) form.  However, it seems that there is a bug in the Shimple 
> translation pack. For the attached program (Test38), the local variable 
> 'b' is split into 'b' and 'b_1' during the loop, but the 'c=b' 
> affectation is not affected, thus producing wrong results when analysing 
> the code.
> 
> 
> For Clarity, I generated the Shimple using "java soot.Main -p jb 
> use-original-names:true -f S toy.Test38", but the problem remains the 
> same without this option.
> 
> 
> Is it a bug in the Shimple transformer, or am I doing something wrong ?
> 
> Thanks in advance,
> -G
> 
> 
> 
> -- 
> Guillaume Salagnac
> PhD Student, Laboratoire Vérimag, Grenoble.
> Je sers la science et c'est ma joie.



> public class toy.Test38 extends java.lang.Object
> {
> 
>     public void <init>()
>     {
>         toy.Test38 r0;
> 
>         r0 := @this: toy.Test38;
>         specialinvoke r0.<java.lang.Object: void <init>()>();
>         return;
>     }
> 
>     public static void main(java.lang.String[])
>     {
>         java.lang.String[] r0;
>         java.lang.Object[] r1;
>         java.lang.Object r2, $r3, r4, r2_1;
>         int i0, i1, i0_1, i0_2, i1_1, i1_2;
> 
>         r0 := @parameter0: java.lang.String[];
>         r1 = newarray (java.lang.Object)[30];
>         r2 = null;
> (0)     i0 = 0;
> 
>      label0:
>         i0_1 = Phi(i0 #0, i0_2 #1);
>         if i0_1 >= 30 goto label1;
> 
>         $r3 = new java.lang.Object;
>         specialinvoke $r3.<java.lang.Object: void <init>()>();
>         r1[i0_1] = $r3;
>         i0_2 = i0_1 + 1;
> (1)     goto label0;
> 
>      label1:
> (2)     i1 = 0;
> 
>      label2:
>         i1_1 = Phi(i1 #2, i1_2 #3);
>         if i1_1 >= 10 goto label3;
> 
>         r2_1 = r1[i1_1];
>         i1_2 = i1_1 + 1;
> (3)     goto label2;
> 
>      label3:
>         r4 = r2;
>         return;
>     }
> }
> 
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list



More information about the Soot-list mailing list