[Soot-list] Incoherent stack height issue.

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Thu Dec 2 04:17:57 EST 2010


Hi Moulik.

By the nature of the error message I assume that the bytecode is
invalid in the following way: Soot computes the height of the stack
after each operation, which also results in the maximal stack hight
for each method. This stack eight is also recorded in the bytecode. In
your case, it appears as if those two values don't match. Actually
this bytecode should not pass verification by the JVM. What happens if
you type "java ... spec.jbb.Company" ?

Eric

--
Dr. Eric Bodden
Software Technology Group, Technische Universität Darmstadt, Germany
Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt


On 30 November 2010 21:50, Moulik <moulik_psg at yahoo.com> wrote:
>
> Hi,
>
> I am new to Soot and facing some difficulties analyzing SPECjbb2005 benchmark through SOOT. SOOT starts to process the input java files and then throws a run time exception "incoherent stack height at block merge point" while analyzing one of the spec java files.
>
> Below is the complete exception message and stack that i see on the stdout
>
> Writing to sootOutput\spec\jbb\Address.class
> Writing to sootOutput\spec\jbb\Company$runModes.class
> Writing to sootOutput\spec\jbb\Infrastructure$SynchronizedJBBSortedStorage.class
> Writing to sootOutput\spec\jbb\Infrastructure$SynchronizedJBBDataStorage.class
> Writing to sootOutput\spec\jbb\infra\Util\ScreenException.class
> Writing to sootOutput\spec\jbb\infra\Util\XMLLineDocumentException.class
> Writing to sootOutput\spec\jbb\Company.class
> Exception in thread "main" java.lang.RuntimeException: <spec.jbb.Company: void loadCustomerTable()>: incoherent stack height at block merge point Block 7:
> [preds: 6 12 ] [succs: 8 9 ]
> nop;
> load.s customerId;
> ;
> load.r this;
> fieldget <spec.jbb.Company: int MaxCustomersPerDistrict>;
> ifcmple.i nop;
> Block 12:
> [preds: 9 11 ] [succs: 7 ]
> nop;
> nop;
> load.s customerId;
> ;
> push 1;
> add.i;
> i2s;
> store.s customerId;
> goto nop;
>
> computed blockHeight == 2 recorded blockHeight = 0
>         at soot.baf.JasminClass.calculateStackHeight(JasminClass.java:1842)
>         at soot.baf.JasminClass.calculateStackHeight(JasminClass.java:1847)
>         at soot.baf.JasminClass.calculateStackHeight(JasminClass.java:1847)
>         at soot.baf.JasminClass.calculateStackHeight(JasminClass.java:1847)
>         at soot.baf.JasminClass.calculateStackHeight(JasminClass.java:1847)
>         at soot.baf.JasminClass.calculateStackHeight(JasminClass.java:1847)
>         at soot.baf.JasminClass.calculateStackHeight(JasminClass.java:1847)
>         at soot.baf.JasminClass.calculateStackHeight(JasminClass.java:1847)
>         at soot.baf.JasminClass.calculateStackHeight(JasminClass.java:1847)
>         at soot.baf.JasminClass.calculateStackHeight(JasminClass.java:1847)
>         at soot.baf.JasminClass.emitMethodBody(JasminClass.java:274)
>         at soot.AbstractJasminClass.emitMethod(AbstractJasminClass.java:689)
>         at soot.AbstractJasminClass.<init>(AbstractJasminClass.java:568)
>         at soot.baf.JasminClass.<init>(JasminClass.java:44)
>         at soot.PackManager.writeClass(PackManager.java:877)
>         at soot.PackManager.writeOutput(PackManager.java:466)
>         at soot.PackManager.writeOutput(PackManager.java:393)
>         at soot.Main.run(Main.java:199)
>         at soot.Main.main(Main.java:141)
>
>
> I am using vanilla SOOT and vanilla specjbb 2005. I have gone through the SOOT mailing list for any other posts related to "Incoherent stack height" but I don't see any relevant posts.
>
> Could some one kindly let me know if I am making any mistake? Thanks in advance.
>
> Many Thanks,
> Moulik S.
>
>
> _______________________________________________
> 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