[Soot-list] Local Packer question - followup

mbatch at cs.mcgill.ca mbatch at cs.mcgill.ca
Mon Jul 17 22:13:07 EDT 2006


I wrote earlier about a local packing problem (see this thread:
http://www.sable.mcgill.ca/pipermail/soot-list/2006-July/000743.html)

I seem to have found a similar (if not the same) problem in a different
instance. Here is a method printed out BEFORE and AFTER local packing.
Note that in the BEFORE, r0 is "this" and n0 is a local of the same type.
While they do not have overlapping uses, per se, r0 is a parameter and
SHOULD NOT be packed together with n0 (as you can see happening in AFTER).

What's even stranger is that if I run this packer on the single class,
there is no problem. If I run it on the entire program (-app) then the
problem appears. Sometimes debugging soot in Eclipse causes the problem
but simply running it does not. In short, this makes very little sense.

Please note: I have not changed the local packer in any way whatsoever.

Thanks for any help or suggestions people might have,

Michael

BEFORE:
<SortItem: void run()>
    Exception trap from 2 to 18 caught at 18
    NullPointerException trap from 5 to 8 caught at 8
0 r0 := @this: SortItem
1 push null
2 store.r n0
3 load.r n0
4 push null
5 virtualinvoke <java.lang.Object: boolean equals(java.lang.Object)>
6 pop
7 goto goto return  17
8 pop
9 load.r r0
10 fieldget <SortItem: java.lang.String algName>
11 staticinvoke <java.lang.Class: java.lang.Class forName(java.lang.String)>
12 virtualinvoke <java.lang.Class: java.lang.Object newInstance()>
13 checkcast
14 load.r r0
15 fieldget <SortItem: int[] sortAry>
16 virtualinvoke <SortAlgorithm: void sort(int[])>
17 goto return  19
18 store.r r1
19 return

AFTER:
<SortItem: void run()>
    Exception trap from 2 to 18 caught at 18
    NullPointerException trap from 5 to 8 caught at 8
0 r0 := @this: SortItem
1 push null
2 store.r r0
3 load.r r0
4 push null
5 virtualinvoke <java.lang.Object: boolean equals(java.lang.Object)>
6 pop
7 goto goto return  17
8 pop
9 load.r r0
10 fieldget <SortItem: java.lang.String algName>
11 staticinvoke <java.lang.Class: java.lang.Class forName(java.lang.String)>
12 virtualinvoke <java.lang.Class: java.lang.Object newInstance()>
13 checkcast
14 load.r r0
15 fieldget <SortItem: int[] sortAry>
16 virtualinvoke <SortAlgorithm: void sort(int[])>
17 goto return  19
18 store.r r0
19 return



More information about the Soot-list mailing list