[lworld] RFR: 8374729: [lworld] Enabling CDS crash with UseAltSubstitutabilityMethod

Matias Saavedra Silva matsaave at openjdk.org
Fri Jan 16 19:20:23 UTC 2026


The alternate substitutability method relies on an injected Java object "acmp_maps" which is currently not being archived and thus leads to crashes attempting to run with a CDS archive. The issue stems from inline klasses being archived and thus loaded at dumptime while the acmp_maps oops is generated in the class file parser, leading this oop to be absent at runtime. 

Additionally, the other injected static field "null_reset" was not being archived either, so both of these fields are properly stored in the archived heap. In the case of CDS/AOT configurations where the heap is not dumped, acmp_maps is regenerated at class loading using a copy of the array stored in metadata.

Tests and APIs are updated to conform to the new output generated by the use of acmp_maps and remove some test cases which target the old substitutability method.

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

Commit messages:
 - More cleanup
 - Cleanup
 - Merge branch 'lworld' into substitutability_cds
 - Changed SubstitutabilityTest
 - Regenerate acmp_maps at runtime with metadata copy
 - Test fixes and exclude inline klasses from dynamic archive
 - Unproblemlist SubstitutabilityTest
 - Merge branch 'lworld' into substitutability_cds
 - Allow heap dumping for statics in value classes
 - Exclude null_reset from heap verifier checks
 - ... and 1 more: https://git.openjdk.org/valhalla/compare/a3e60b81...9386c4a9

Changes: https://git.openjdk.org/valhalla/pull/1903/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1903&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8374729
  Stats: 121 lines in 13 files changed: 93 ins; 21 del; 7 mod
  Patch: https://git.openjdk.org/valhalla/pull/1903.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1903/head:pull/1903

PR: https://git.openjdk.org/valhalla/pull/1903


More information about the valhalla-dev mailing list