RFR: 8263968: CDS: java/lang/ModuleLayer.EMPTY_LAYER should be singleton [v2]

Aleksei Voitylov avoitylov at openjdk.java.net
Tue Mar 23 08:04:09 UTC 2021


> With CDS and G1, test api/java_lang/ModuleLayer/Boot.html fails in JDK 16. 
> 
> After JDK-8253081 with CDS enabled two instances of empty layer appear in the runtime. One comes from default initialization of java/lang/ModuleLayer.EMPTY_LAYER, another one comes from CDS archive and is returned by ModuleLayer.boot().parents().get(0). The fix makes java/lang/ModuleLayer.EMPTY_LAYER a singleton with both CDS on and off, similar to java/lang/module/Configuration.EMPTY_CONFIGURATION.
> 
> Testing: JCK 16, jtreg (including newly added test), pre-submit GitHub actions tests.

Aleksei Voitylov has updated the pull request incrementally with one additional commit since the last revision:

  fix style

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3131/files
  - new: https://git.openjdk.java.net/jdk/pull/3131/files/3a69084a..0cae1a2d

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3131&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3131&range=00-01

  Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3131.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3131/head:pull/3131

PR: https://git.openjdk.java.net/jdk/pull/3131


More information about the hotspot-runtime-dev mailing list