From 4ea5319d5696af7d75075085044e2da4358247f9 Mon Sep 17 00:00:00 2001 From: lfoltan Date: Mon, 25 Aug 2014 15:57:10 -0400 Subject: [PATCH] 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 --- src/share/vm/classfile/classFileParser.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/share/vm/classfile/classFileParser.cpp b/src/share/vm/classfile/classFileParser.cpp index c0d414311..35a0758c4 100644 --- a/src/share/vm/classfile/classFileParser.cpp +++ b/src/share/vm/classfile/classFileParser.cpp @@ -2780,7 +2780,7 @@ void ClassFileParser::parse_classfile_bootstrap_methods_attribute(u4 attribute_b ClassFileStream* cfs = stream(); 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", attribute_byte_length, CHECK); @@ -2793,11 +2793,6 @@ 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), - "Invalid BootstrapMethods attribute length %u in class file %s", - attribute_byte_length, - CHECK); - // The attribute contains a counted array of counted tuples of shorts, // represending bootstrap specifiers: // length*{bootstrap_method_index, argument_count*{argument_index}} -- GitLab