[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
incoherent stack height
Hi,
The method in question:
static void refer()
{
for (int i=0;i<8;i++)
{}
}
has the following baf output:
push 0
store.i i0
load.i i0
push 8
ifcmpge.i return
inc.i i0 1
goto load.i i0
return
When I insert a dup before the store and delete the subsequent load (which should
result in the same stack layout) I get:
push 0
dup1.i
store.i i0
push 8
ifcmpge.i return
inc.i i0 1
goto push 8
return
which I output right after the modification. Then soot complains:
Exception in thread "main" java.lang.RuntimeException: incoherent stack height a
t block merge point Block 1:
[preds: 0 2 ] [succs: 2 3 ]
push 8;
ifcmpge.i return;
Block 2:
[preds: 1 ] [succs: 1 ]
inc.i i0 1;
goto push 8;
computed blockHeight == 0 recorded blockHeight = 1
at soot.baf.JasminClass.calculateStackHeight(JasminClass.java:1799)
at soot.baf.JasminClass.calculateStackHeight(JasminClass.java:1804)
It compiles fine when I leave the original load instruction in the code together
with the newly inserted dup.
What am I doing wrong?
I'm using revision 1792.
Thanks
Uwe
--
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm