[Soot-list] Re: [abc-dev] issue with method stack size

Ondrej Lhotak olhotak at sable.mcgill.ca
Tue Nov 8 12:28:38 EST 2005


Yes, this is a Soot bug.

I've fixed it in Soot revision 2227.

Ondrej

On Tue, Nov 08, 2005 at 05:55:43PM +0100, Michael Haupt wrote:
> Dear all,
> 
> when using abc with the Jikes RVM 2.3.1, I've come across the following 
> problem.
> 
> The abc compiler generated an aspect's class initialiser <clinit> with 
> the following bytecode:
> 
> -----
> 0:   invokestatic    #25; //Method abc$preClinit:()V
> 3:   invokestatic    #28; //Method abc$postClinit:()V
> 6:   goto    12
> 9:   putstatic       #30; //Field ...
> 12:  return
>    Exception table:
>     from   to  target type
>       3     6     9   Class java/lang/Throwable
> -----
> 
> (The field being set at index 9 contains a Throwable; I've omitted that 
> for better layout.)
> 
> This static initialiser requires a stack size (operand words) of 1 
> because the potential exception must be put on the stack. However, abc 
> generates the method with a stack size of 0.
> 
> The Sun JVM accepts this code without problems. The Jikes RVM (2.3.1) 
> crashes during building GC maps prior to compilation. I think Jikes is 
> right, because the stack size value should reflect the actually needed 
> stack size.
> 
> With respect to the generation of "specification-compliant" bytecode, I 
> believe that's a bug, regardless of whether the Sun JVM can live with 
> it. I'd rather say the Sun JVM does not stick to the standards properly.
> 
> Best regards,
> 
> Michael Haupt
> 
> -- 
> Dipl.-Ing. Michael Haupt            haupt at informatik.tu-darmstadt.de
> Software Technology Group           Phone:  ++49 (0) 6151-16-5306
> Darmstadt University of Technology  Fax:    ++49 (0) 6151-16-5410
> Hochschulstr. 10, 64289 Darmstadt, Germany
> http://www.st.informatik.tu-darmstadt.de/
> 




More information about the Soot-list mailing list