JDK-8328313 : Archived module graph should allow identical --module-path to be specified during dump time and run time
Type:Sub-task
Component:hotspot
Sub-Component:runtime
Priority:P4
Status:Resolved
Resolution:Fixed
Submitted:2024-03-17
Updated:2024-10-07
Resolved:2024-10-02
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
If --module-path is specified during dump time:
- allow the FMG to be dumped
- at run time, checks that the exact same --module-path is specified, or else prevent the FMG from being used.
A pull request was submitted for review.
Branch: master
URL: https://git.openjdk.org/jdk/pull/21048
Date: 2024-09-17 23:44:40 +0000
17-09-2024
Some notes on corelib changes:
ModuleReferences.java:
Changing some lambda expressions to inner classes, it is due to we cannot handle lambda heap objects (i.e., instances of ModuleReferences$$Lambda/0x800000031) in the archived heap.
The JarModuleReader constructor accepts a String instead of a Path as the first arg because Path on Windows contains a SoftReference which cannot be archived (see JDK-8284336).
ClassLoaders.java and BuiltinClassLoader.java:
Same reason as above regarding SoftReference.