8327624: Remove VM implementation that bypass verification for core reflection

Reviewed-by: liach, dholmes, jrose, alanb, mli
This commit is contained in:
Mandy Chung 2024-10-22 18:14:37 +00:00
parent 28147dab07
commit d6eddcdaf9
28 changed files with 12 additions and 2817 deletions

View file

@ -309,11 +309,6 @@ void Modules::define_module(Handle module, jboolean is_open, jstring version,
}
oop loader = java_lang_Module::loader(module());
// Make sure loader is not the jdk.internal.reflect.DelegatingClassLoader.
if (loader != java_lang_ClassLoader::non_reflection_class_loader(loader)) {
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
"Class loader is an invalid delegating class loader");
}
Handle h_loader = Handle(THREAD, loader);
// define_module can be called during start-up, before the class loader's ClassLoaderData
// has been created. SystemDictionary::register_loader ensures creation, if needed.