JDK-7008165 : Garbage in ClassFormatError message
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs20
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-12-21
  • Updated: 2012-02-01
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u25Fixed 7Fixed hs20Fixed
Related Reports
Relates :  
Description
When bootstrap_method_ref in BootstrapMethods attribute points to a wrong CP entry (non-MethodHandle), JVM throws ClassFormatError with a message, where method index and class file name is garbage:

Exception in thread "main" java.lang.ClassFormatError: bootstrap_method_index 141157536 has bad constant type in class file ��

It seems like the corresponding sprintf() does not receive method index and class file name.

This bug was introduced by CR 7001379.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/ef3c5db0b3ae
21-12-2010

EVALUATION Two check_property calls without specifying the index were added with 7001379.
21-12-2010

SUGGESTED FIX Simply add the index as argument to check_property.
21-12-2010