[lworld] RFR: 8374729: [lworld] Enabling CDS crash with UseAltSubstitutabilityMethod
Frederic Parain
fparain at openjdk.org
Fri Jan 16 20:20:16 UTC 2026
On Wed, 14 Jan 2026 15:05:24 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
> 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.
src/hotspot/share/cds/heapShared.cpp line 826:
> 824: // Only concrete value classes need the null_reset field
> 825: InlineKlass* ilk = InlineKlass::cast(k);
> 826: if (ilk->has_nullable_atomic_layout()) {
If PR https://github.com/openjdk/valhalla/pull/1407 is pushed before this PR, this test will have to be changed to
if (ilk->supports_nullable_layouts()) {
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1903#discussion_r2699848641
More information about the valhalla-dev
mailing list