[Soot-list] [abc-dev] issue with method stack size (fwd)

Prof. Laurie HENDREN hendren at cs.mcgill.ca
Tue Nov 8 12:01:09 EST 2005


Any opinions on this?

Laurie


+-----------------------------------------------------------------
| Laurie Hendren --- laurie.hendren at mcgill.ca
| Associate Dean (Academic), Faculty of Science,
| Dawson Hall, McGill University, 853 Sherbrooke St W,
| Montreal QC H3A 2T6 Canada, 514-398-7179, fax 514-398-1774
+----------------------------------------------------------------
| For contact and home page info as Professor, Computer Science:
| http://www.sable.mcgill.ca/~hendren   ---  hendren at cs.mcgill.ca
| Research: http://www.sable.mcgill.ca  http://aspectbench.org
+----------------------------------------------------------------

---------- Forwarded message ----------
Date: Tue, 08 Nov 2005 17:55:43 +0100
From: Michael Haupt <haupt at informatik.tu-darmstadt.de>
Reply-To: abc-dev at comlab.ox.ac.uk
To: abc-dev at comlab.ox.ac.uk
Subject: [abc-dev] issue with method stack size

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