United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6891959 HotSpot should not throw ClassFormatError if a class has a field with '>' and/or '<' in its name
6891959 : HotSpot should not throw ClassFormatError if a class has a field with '>' and/or '<' in its name

Details
Type:
Bug
Submit Date:
2009-10-15
Status:
Closed
Updated Date:
2012-10-08
Project Name:
JDK
Resolved Date:
2010-11-12
Component:
hotspot
OS:
generic
Sub-Component:
runtime
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs20,7
Fixed Versions:
hs20

Related Reports
Backport:
Backport:

Sub Tasks

Description
JVMS does not prohibit for a field in class file to contain '>' and/or '<', but HotSpot throws ClassFormatError in such cases.

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/jdk7/build/hotspot/rev/6412b3805cd6
                                     
2010-12-04
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/6412b3805cd6
                                     
2010-10-27
EVALUATION

Note that the appropriate JCK test was fixed in JCK7 to check more names - before that it tested
only one field with "f>" name. However, after the change from 46.0 to different class
file versions (>=49.0) the updated test still fails:
  51.0:
    - ClassFormatError is thrown for a field with name "<init>"
    - ClassFormatError is not thrown for a field with name "f[f", or "f[", or "[f", or "["

  49.0 or 50.0:
    - ClassFormatError is not thrown for a field with name "f[f", or "f[", or "[f", or "["

This behaviour contradicts to (draft) JVMS3:
--- cut ---
  4.2.2 Unqualified Names
  Names of methods, fields and local variables are stored as unqualified names.
  Unqualified names must not contain the characters '.', ';', '[' or '/'. Method
  names are further constrained so that, with the exception of the special method
  names <init> and <clinit> (??3.9), they must not contain the characters '<' or
  '>'.
--- cut ---
                                     
2010-10-23
EVALUATION

The assembled test class in this case is using classfile version 46.0.  For backward compatibility, the JVM will not change behavior in respect to older classfile versions.  If the classfile versions are upgraded to >= 49 (in the *.jcod/class files), then the JVM parser applies the new logic and the test cases passes.

Reassigning to TCK.
                                     
2010-10-22



Hardware and Software, Engineered to Work Together