2057 u2 max_lvtt_cnt = INITIAL_MAX_LVT_NUMBER; |
2057 u2 max_lvtt_cnt = INITIAL_MAX_LVT_NUMBER; |
2058 u2* localvariable_table_length; |
2058 u2* localvariable_table_length; |
2059 u2** localvariable_table_start; |
2059 u2** localvariable_table_start; |
2060 u2* localvariable_type_table_length; |
2060 u2* localvariable_type_table_length; |
2061 u2** localvariable_type_table_start; |
2061 u2** localvariable_type_table_start; |
2062 u2 method_parameters_length = 0; |
2062 int method_parameters_length = -1; |
2063 u1* method_parameters_data = NULL; |
2063 u1* method_parameters_data = NULL; |
2064 bool method_parameters_seen = false; |
2064 bool method_parameters_seen = false; |
2065 bool parsed_code_attribute = false; |
2065 bool parsed_code_attribute = false; |
2066 bool parsed_checked_exceptions_attribute = false; |
2066 bool parsed_checked_exceptions_attribute = false; |
2067 bool parsed_stackmap_attribute = false; |
2067 bool parsed_stackmap_attribute = false; |
2276 if (method_parameters_seen) { |
2276 if (method_parameters_seen) { |
2277 classfile_parse_error("Multiple MethodParameters attributes in class file %s", CHECK_(nullHandle)); |
2277 classfile_parse_error("Multiple MethodParameters attributes in class file %s", CHECK_(nullHandle)); |
2278 } |
2278 } |
2279 method_parameters_seen = true; |
2279 method_parameters_seen = true; |
2280 method_parameters_length = cfs->get_u1_fast(); |
2280 method_parameters_length = cfs->get_u1_fast(); |
2281 if (method_attribute_length != (method_parameters_length * 4u) + 1u) { |
2281 const u2 real_length = (method_parameters_length * 4u) + 1u; |
|
2282 if (method_attribute_length != real_length) { |
2282 classfile_parse_error( |
2283 classfile_parse_error( |
2283 "Invalid MethodParameters method attribute length %u in class file", |
2284 "Invalid MethodParameters method attribute length %u in class file", |
2284 method_attribute_length, CHECK_(nullHandle)); |
2285 method_attribute_length, CHECK_(nullHandle)); |
2285 } |
2286 } |
2286 method_parameters_data = cfs->get_u1_buffer(); |
2287 method_parameters_data = cfs->get_u1_buffer(); |
2287 cfs->skip_u2_fast(method_parameters_length); |
2288 cfs->skip_u2_fast(method_parameters_length); |
2288 cfs->skip_u2_fast(method_parameters_length); |
2289 cfs->skip_u2_fast(method_parameters_length); |
2289 // ignore this attribute if it cannot be reflected |
2290 // ignore this attribute if it cannot be reflected |
2290 if (!SystemDictionary::Parameter_klass_loaded()) |
2291 if (!SystemDictionary::Parameter_klass_loaded()) |
2291 method_parameters_length = 0; |
2292 method_parameters_length = -1; |
2292 } else if (method_attribute_name == vmSymbols::tag_synthetic()) { |
2293 } else if (method_attribute_name == vmSymbols::tag_synthetic()) { |
2293 if (method_attribute_length != 0) { |
2294 if (method_attribute_length != 0) { |
2294 classfile_parse_error( |
2295 classfile_parse_error( |
2295 "Invalid Synthetic method attribute length %u in class file %s", |
2296 "Invalid Synthetic method attribute length %u in class file %s", |
2296 method_attribute_length, CHECK_(nullHandle)); |
2297 method_attribute_length, CHECK_(nullHandle)); |