mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8201556: Disallow reading oops in ClassLoaderData if unloading
Move class_loader oop to an OopHandle, and assert that holder is alive when getting class_loader. Reviewed-by: kbarrett, adinn
This commit is contained in:
parent
702ac597ad
commit
ddfd4c33c6
22 changed files with 121 additions and 47 deletions
|
@ -357,6 +357,14 @@ Handle SystemDictionaryShared::init_security_info(Handle class_loader, InstanceK
|
|||
return pd;
|
||||
}
|
||||
|
||||
bool SystemDictionaryShared::is_sharing_possible(ClassLoaderData* loader_data) {
|
||||
oop class_loader = loader_data->class_loader();
|
||||
return (class_loader == NULL ||
|
||||
(UseAppCDS && (SystemDictionary::is_system_class_loader(class_loader) ||
|
||||
SystemDictionary::is_platform_class_loader(class_loader)))
|
||||
);
|
||||
}
|
||||
|
||||
// Currently AppCDS only archives classes from the run-time image, the
|
||||
// -Xbootclasspath/a path, the class path, and the module path.
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue