JDK-6844449 : JVM crash for some invalid invokedynamic's method descriptors
Type:Bug
Component:hotspot
Sub-Component:compiler
Affected Version:7
Priority:P3
Status:Closed
Resolution:Duplicate
OS:generic
CPU:generic
Submitted:2009-05-22
Updated:2011-03-30
Resolved:2011-03-30
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.
JDK7-b59 VM crashes for some invalid descriptors of invokedynamic instruction:
mname:"(#)V"
mname:"(.)V"
mname:"(;)V"
mname:"()V#"
mname:"()V."
mname:"()V;"
Comments
EVALUATION
The system now gives error like the following on all of the suggested inputs:
Exception in thread "main" java.lang.ClassFormatError: Method "dynMeth" in class Test has illegal signature "(!)V"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:795)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:144)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:470)
This appears to be due to changes introduced in May 2010 under this bug, fixed circa b100:
6930553: classfile format checker allows invalid method descriptor in CONSTANT_NameAndType_info in some cases
Closing as a dup of 6930553.