Skip to main content

StackMapTable and debug info in latest builds

5 replies [Last post]
euxx
Offline
Joined: 2003-06-10

It looks like StackMapTable attribute is completely missing in all rt.jar classes in several last builds. I am not sure when exactly it happens, but all 4 archive builds have this issue and it was ok in build 48 and few builds after that.

Another thing that rt.jar does not have debug information about variable names.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
olivier_thomann
Offline
Joined: 2005-09-06

Hi,

Using -XX:-FailOverToOldVerifier -Xverify:all on a simple HelloWorld program leads to a verify error because of missing stack map table.

java -XX:-FailOverToOldVerifier -Xverify:all X
Error occurred during initialization of VM
java.lang.VerifyError: Expecting a stackmap frame at branch target 20 in method java.lang.ref.Reference.(Ljava/lang/Object;Ljava/lang/ref/ReferenceQueue;)V

If the stack map tables are definitely removed from the 1.6 drops, then how can I verify that the generated map are ok without crashing in library code?

I am working on generating this attribute for the Eclipse compiler, but so far I have been able to verify that the verifier is happy with what I generate.

Thanks for your help.

Olivier

vijayj
Offline
Joined: 2004-10-26

> Another thing that rt.jar does not have debug information about variable names.

Did you try downloading our debug bundle?.

http://download.java.net/jdk6/binaries/

Thanks,
Vijayan.

olivier_thomann
Offline
Joined: 2005-09-06

If "java -XX:-FailOverToOldVerifier -Xverify:all X" doesn't work to verify the stack map table attributes, what would be the right option to use to verify .class files that contain the stack map table attributes?

I am using 6.0b62 build and the above line fails with a VerifyError in library code.

Thanks,

Olivier

peterahe
Offline
Joined: 2004-11-22

rt.jar doesn't include debug information about variable
names as it takes up too much space in the download bundle.

We decided to strip the StackMapTable attribute for two
reasons:

1. The classes in rt.jar are never verified - if you can't
trust rt.jar, what can you trust?

2. We are keeping a close watch on the download size and
decided to have pack200 strip the tables (they are
optional).

euxx
Offline
Joined: 2003-06-10

Peter, thanks for the explanation.

Actually I thought that class format specification was saying that stackmap tables are mandatory for bytecode version 50+. Is it changed now and stack map tables going to be optional for all classes? Or you have hardcoded all classes that comes from rt.jar?

regards,
Eugene