RFR: 8343839: Detect patched modules and abort run-time image link early

Severin Gehwolf sgehwolf at openjdk.org
Tue Nov 12 11:05:34 UTC 2024


Please review this fix to how patched modules are being handled when linking from the run-time image. During review of [JDK-8311302](https://bugs.openjdk.org/browse/JDK-8311302) it was pointed out that module patching should be detected earlier and the link should get aborted in that case.

This patch implements it, by looking at the `jdk.module.patch.0` property like [other code in the JDK](https://github.com/openjdk/jdk/blob/2c1e4c381615ce52276f4bf331a1e7a845af4b6e/src/hotspot/share/cds/cdsConfig.cpp#L282) does. After this patch module patching is being detected before any archives are being read or the actual linking process starts (contrary to the previous solution).

Testing:
- [x] GHA testing (mac aarch64 test failures are infra related)
- [x] Local testing of existing test, which covers it

Thoughts?

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

Commit messages:
 - 8343839: Detect patched modules and abort run-time image link early

Changes: https://git.openjdk.org/jdk/pull/22037/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22037&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8343839
  Stats: 23 lines in 7 files changed: 7 ins; 13 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/22037.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22037/head:pull/22037

PR: https://git.openjdk.org/jdk/pull/22037


More information about the core-libs-dev mailing list