提交 4ea5319d 编写于 作者: L lfoltan

8051002: Incorrectly merged share/vm/classfile/classFileParser.cpp was pushed to 8u20.

Summary: Correct fix for allowing BootstrapMethods attribute with an empty bootstrap_methods table.
Reviewed-by: coleenp, ctornqvi, hseigel
上级 1d1ae42f
...@@ -2780,7 +2780,7 @@ void ClassFileParser::parse_classfile_bootstrap_methods_attribute(u4 attribute_b ...@@ -2780,7 +2780,7 @@ void ClassFileParser::parse_classfile_bootstrap_methods_attribute(u4 attribute_b
ClassFileStream* cfs = stream(); ClassFileStream* cfs = stream();
u1* current_start = cfs->current(); u1* current_start = cfs->current();
guarantee_property(attribute_byte_length > sizeof(u2), guarantee_property(attribute_byte_length >= sizeof(u2),
"Invalid BootstrapMethods attribute length %u in class file %s", "Invalid BootstrapMethods attribute length %u in class file %s",
attribute_byte_length, attribute_byte_length,
CHECK); CHECK);
...@@ -2793,11 +2793,6 @@ void ClassFileParser::parse_classfile_bootstrap_methods_attribute(u4 attribute_b ...@@ -2793,11 +2793,6 @@ void ClassFileParser::parse_classfile_bootstrap_methods_attribute(u4 attribute_b
"Short length on BootstrapMethods in class file %s", "Short length on BootstrapMethods in class file %s",
CHECK); CHECK);
guarantee_property(attribute_byte_length >= sizeof(u2),
"Invalid BootstrapMethods attribute length %u in class file %s",
attribute_byte_length,
CHECK);
// The attribute contains a counted array of counted tuples of shorts, // The attribute contains a counted array of counted tuples of shorts,
// represending bootstrap specifiers: // represending bootstrap specifiers:
// length*{bootstrap_method_index, argument_count*{argument_index}} // length*{bootstrap_method_index, argument_count*{argument_index}}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册