[Soot-list] Bug in shimple transformation ?
Guillaume Salagnac
guillaume.salagnac at imag.fr
Tue Oct 11 12:32:53 EDT 2005
Hi,
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test38.java
Type: text/x-java
Size: 377 bytes
Desc:
Url : http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20051011/f04fca92/Test38.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test38.class
Type: application/x-java-vm
Size: 566 bytes
Desc:
Url : http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20051011/f04fca92/Test38-0001.bin
-------------- next part --------------
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;
}
}
More information about the Soot-list
mailing list