You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When VM snapshotting is enabled, restore runs need to restore snapshotted modules.
The restoration procedure in java11vmi.c::restoreModule loops over all classes loaded from the persisted systemClassLoader, then performs a string compare to identify whether a classes module is the java.base module.
There is an issue that I've seen in JDK21 (but likely affects other versions too), that a clazz->module->moduleName is null, but this case isn't handled (results in a seg fault here).
Unnamed module's module names are set to NULL [1, 2], so if the walker over classes from systemClassLoader returns a class whose module is an unnamed module, the problematic code path will result in a failure.
The text was updated successfully, but these errors were encountered:
ThanHenderson
changed the title
Handle potentially null clazzModule->:wmoduleName in restoreModule
Handle potentially null moduleName in restoreModule
Dec 30, 2024
When VM snapshotting is enabled, restore runs need to restore snapshotted modules.
The restoration procedure in
java11vmi.c::restoreModule
loops over all classes loaded from the persistedsystemClassLoader
, then performs a string compare to identify whether a classes module is thejava.base
module.There is an issue that I've seen in JDK21 (but likely affects other versions too), that a
clazz->module->moduleName
is null, but this case isn't handled (results in a seg fault here).Unnamed module's module names are set to NULL [1, 2], so if the walker over classes from
systemClassLoader
returns a class whose module is an unnamed module, the problematic code path will result in a failure.The text was updated successfully, but these errors were encountered: