mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8152949: Jigsaw crash when Klass in _fixup_module_field_list is unloaded
During start up anonymous classes must be kept alive until after their mirror's module field is patched with java.base Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com> Reviewed-by: coleenp, hseigel
This commit is contained in:
parent
4adb7c0788
commit
48892f6f68
6 changed files with 31 additions and 6 deletions
|
@ -277,6 +277,11 @@ static void define_javabase_module(jobject module, jstring version,
|
|||
{
|
||||
MutexLocker m1(Module_lock, THREAD);
|
||||
|
||||
if (ModuleEntryTable::javabase_defined()) {
|
||||
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
|
||||
"Module java.base is already defined");
|
||||
}
|
||||
|
||||
// Verify that all java.base packages created during bootstrapping are in
|
||||
// pkg_list. If any are not in pkg_list, than a non-java.base class was
|
||||
// loaded erroneously pre java.base module definition.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue