equal
deleted
inserted
replaced
5405 set_klass(ik); |
5405 set_klass(ik); |
5406 |
5406 |
5407 debug_only(ik->verify();) |
5407 debug_only(ik->verify();) |
5408 } |
5408 } |
5409 |
5409 |
|
5410 static bool relax_format_check_for(ClassLoaderData* loader_data) { |
|
5411 bool trusted = (loader_data->is_the_null_class_loader_data() || |
|
5412 SystemDictionary::is_platform_class_loader(loader_data->class_loader())); |
|
5413 bool need_verify = |
|
5414 // verifyAll |
|
5415 (BytecodeVerificationLocal && BytecodeVerificationRemote) || |
|
5416 // verifyRemote |
|
5417 (!BytecodeVerificationLocal && BytecodeVerificationRemote && !trusted); |
|
5418 return !need_verify; |
|
5419 } |
|
5420 |
5410 ClassFileParser::ClassFileParser(ClassFileStream* stream, |
5421 ClassFileParser::ClassFileParser(ClassFileStream* stream, |
5411 Symbol* name, |
5422 Symbol* name, |
5412 ClassLoaderData* loader_data, |
5423 ClassLoaderData* loader_data, |
5413 Handle protection_domain, |
5424 Handle protection_domain, |
5414 const Klass* host_klass, |
5425 const Klass* host_klass, |
5493 // synch back verification state to stream |
5504 // synch back verification state to stream |
5494 stream->set_verify(_need_verify); |
5505 stream->set_verify(_need_verify); |
5495 |
5506 |
5496 // Check if verification needs to be relaxed for this class file |
5507 // Check if verification needs to be relaxed for this class file |
5497 // Do not restrict it to jdk1.0 or jdk1.1 to maintain backward compatibility (4982376) |
5508 // Do not restrict it to jdk1.0 or jdk1.1 to maintain backward compatibility (4982376) |
5498 _relax_verify = Verifier::relax_verify_for(_loader_data->class_loader()); |
5509 _relax_verify = relax_format_check_for(_loader_data); |
5499 |
5510 |
5500 parse_stream(stream, CHECK); |
5511 parse_stream(stream, CHECK); |
5501 |
5512 |
5502 post_process_parsed_stream(stream, _cp, CHECK); |
5513 post_process_parsed_stream(stream, _cp, CHECK); |
5503 } |
5514 } |