JDK-8360555 : Archive all unnamed modules in CDS full module graph
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-06-25
  • Updated: 2025-07-25
  • Resolved: 2025-07-22
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.

To download the current JDK release, click here.
JDK 26
26 b08Fixed
Description
See https://github.com/openjdk/jdk/blob/56c75453cd69e80b9411b4e1794c953998406342/src/hotspot/share/classfile/modules.cpp#L513-L519

The CDS full module graph is supposed to contain a snapshot of the boot layer, which has 3 unnamed modules for the boot, platform and system class loaders. Each unnamed module is represented by a java.lang.Module Java object and a ModuleEntry C++ object.

Currently, we archive only the java.lang.Module for the platform and system loaders. The other 4 objects are dynamically created in the production run while executing Java bytecodes during VM bootstrap.

Proposal

Archive all of the above 6 objects when CDSConfig::is_dumping_full_module_graph() is true.

This is required for JDK-8350550, as we need the java.lang.Module object for archived classes in the unnamed module of the boot loader prior to executing any Java code.


Comments
Changeset: aae99022 Branch: master Author: Ioi Lam <iklam@openjdk.org> Date: 2025-07-22 20:17:31 +0000 URL: https://git.openjdk.org/jdk/commit/aae9902234d36049ec99a2f50934c526dd6235eb
22-07-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/26082 Date: 2025-07-02 00:18:28 +0000
02-07-2025

Prototype (based on leyden/premain branch) https://github.com/iklam/jdk/commit/b822d48998bf809e5943510ba34b3a6f117fb73a
25-06-2025