[Soot-list] incoherent stack height
Khilan Gudka
khilan at doc.ic.ac.uk
Sun Jul 11 10:27:09 EDT 2010
Hi,
I'm instrumenting code but jasmin is throwing the following exception
for one particular class:
Exception in thread "main" java.lang.RuntimeException:
<org.hsqldb.jdbc.jdbcConnection: java.util.Map getTypeMap()>:
incoherent stack height at block merge point Block 193:
[preds: 192 196 ] [succs: 194 197 ]
Block 196:
[preds: 194 195 ] [succs: 193 ]
inc.i $elem235 1;
goto load.i $elem235;
computed blockHeight == 18 recorded blockHeight = 17
at soot.baf.JasminClass.calculateStackHeight(JasminClass.java:1842)
at soot.baf.JasminClass.calculateStackHeight(JasminClass.java:1847)
...
The corresponding jimple code (i think) is:
$p213 = $c213.<java.util.HashMap:
java.util.HashMap$HashEntry[] buckets>;
if $p213 == null goto label58;
$locked213 = staticinvoke <MyClass: boolean
m(java.lang.Object)>($p213, 1);
if $locked213 == 0 goto label0;
$idx235 = 0;
label55:
$len235 = lengthof $p213;
if $idx235 >= $len235 goto label57;
$elem235 = $p213[$idx235];
if $elem235 == null goto label56;
$locked235 = staticinvoke < MyClass: boolean
m(java.lang.Object)>($elem235, 1);
if $locked235 == 0 goto label0;
label56:
$idx235 = $idx235 + 1;
goto label55;
label57:
nop;
However, I don't understand why $elem235 is being incremented and not
$idx235 (as is being done in the jimple?). All the $ variables are
local variables.
Thanks,
Khilan
More information about the Soot-list
mailing list