-
Bug
-
Resolution: Fixed
-
P2
-
9
-
b137
-
Not verified
According to
https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.6
there is several requirements to name_index and descriptor_index references.
1. name_index should point to valid field or method name. So, names which contains no characters or contains any of (.;/[) should be prohibited.
Actual behaviour:
names 'm[', 'm.', 'm/', m;', '', '/' are permitted (see tests at vm/classfmt/cpl/cplnat005/cplnat00501m_invalidname_v*)
These names are prohibited in the case given NameAndType is referenced from fieldref, Methodref or InterfaceMethodref.
2. descriptor_index should be valid method or field descriptor.
Actual behaviour: descriptors containing classes with invalid binary names aren't prohibited. E.g. following descriptors are possible:
Lt//T;
Lt///T;
Lt/T.;
Lt/T[;
Lt/T;;
Lt/T.;
Lt;/T;
(Lt//T;)V
(Lt/T[;)V
... etc, see more at vm/classfmt/cpl/cplnat006/cplnat00601m_method_invaliddesc_v* and vm/classfmt/cpl/cplnat006/cplnat00601m_field_invaliddesc_v* correspondingly.
However some of bad methods signatures are prohibited (for version 53):
(Lt/T;;)V
(Lt;/T;)V
()Lt/T.;
()Lt/T;;
()Lt;/T;
(Lt/T.;)V
The behavour of 'unused' NameAndType structure and structure referenced by Fieldref/Methodref/InterfaceMethodref (unused) are the same.
Was found on jdk9b123. Tests already in repository. Separate examples will be attached by request.
https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.6
there is several requirements to name_index and descriptor_index references.
1. name_index should point to valid field or method name. So, names which contains no characters or contains any of (.;/[) should be prohibited.
Actual behaviour:
names 'm[', 'm.', 'm/', m;', '', '/' are permitted (see tests at vm/classfmt/cpl/cplnat005/cplnat00501m_invalidname_v*)
These names are prohibited in the case given NameAndType is referenced from fieldref, Methodref or InterfaceMethodref.
2. descriptor_index should be valid method or field descriptor.
Actual behaviour: descriptors containing classes with invalid binary names aren't prohibited. E.g. following descriptors are possible:
Lt//T;
Lt///T;
Lt/T.;
Lt/T[;
Lt/T;;
Lt/T.;
Lt;/T;
(Lt//T;)V
(Lt/T[;)V
... etc, see more at vm/classfmt/cpl/cplnat006/cplnat00601m_method_invaliddesc_v* and vm/classfmt/cpl/cplnat006/cplnat00601m_field_invaliddesc_v* correspondingly.
However some of bad methods signatures are prohibited (for version 53):
(Lt/T;;)V
(Lt;/T;)V
()Lt/T.;
()Lt/T;;
()Lt;/T;
(Lt/T.;)V
The behavour of 'unused' NameAndType structure and structure referenced by Fieldref/Methodref/InterfaceMethodref (unused) are the same.
Was found on jdk9b123. Tests already in repository. Separate examples will be attached by request.
- relates to
-
JDK-8149499 Implement -Xfuture checks as defaults
-
- Closed
-