-
Bug
-
Resolution: Fixed
-
P3
-
8, 9, 14, 15
-
b04
There are a number of ways to get SA to dump the in memory version of a class into a .class file. For example, within clhsdb the buildreplayjars and dumpclass commands both do so, as does the SA ClassDump "tool", which is effectively the same as buildreplayjars. All of these rely on the ClassWriter class to generate the .class file, but it neglects to include the StackMapTable code attributes when dumping. This result in a VerifyError for classefile versions 51 and later (JDK 1.7) when trying to use these classes.
It might not be too hard to get ClassWriter to include StackMapTable code attributes. They can be found in the ConstMethod::_stackmap_data field. However, it's unclear if this is all that is needed to make these dumped classes runnable. It appears that classes have not been runnable since JDK 1.7, and probably there are other classfile changes since then that ClassWriter is not aware of and needs to be.
It might not be too hard to get ClassWriter to include StackMapTable code attributes. They can be found in the ConstMethod::_stackmap_data field. However, it's unclear if this is all that is needed to make these dumped classes runnable. It appears that classes have not been runnable since JDK 1.7, and probably there are other classfile changes since then that ClassWriter is not aware of and needs to be.
- relates to
-
JDK-8310618 Test serviceability/sa/ClhsdbDumpclass.java fails after 8242152: 'StackMapTable:' missing from stdout/stderr
- Closed
-
JDK-8240990 convert clhsdb "dumpclass" command from javascript to java
- Resolved
-
JDK-8309979 BootstrapMethods attribute is missing in class files recreated by SA
- Resolved
-
JDK-8022659 ClassDump should dump all class attributes.
- Closed
(2 links to)