8041918: BootstrapMethods attribute cannot be empty

Allow a BootstrapMethods attribute that contains an empty bootstrap_methods table where num_bootstrap_methods is equal to zero.

Reviewed-by: coleenp, hseigel
This commit is contained in:
Lois Foltan 2014-05-15 09:25:27 -04:00
parent f0baee0a2c
commit ca501f6b00
5 changed files with 233 additions and 1 deletions

View file

@ -2805,7 +2805,7 @@ void ClassFileParser::parse_classfile_bootstrap_methods_attribute(u4 attribute_b
"Short length on BootstrapMethods in class file %s",
CHECK);
guarantee_property(attribute_byte_length > sizeof(u2),
guarantee_property(attribute_byte_length >= sizeof(u2),
"Invalid BootstrapMethods attribute length %u in class file %s",
attribute_byte_length,
CHECK);