On Fri, 16 Jan 2026 19:34:52 GMT, Coleen Phillimore <[email protected]> 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/cdsHeapVerifier.cpp line 312: > >> 310: // Any concrete value class will have a field ".null_reset" >> which holds an >> 311: // all-zero instance of the value class so it will not change >> between >> 312: // dump time and runtime. > > I'm not sure how this comment about the .null_reset value applies in this if > statement? It doesn't seem related to the LIMITATION comment above and there > doesn't seem to be anything special done for null reset here either. Without the if statement, we'd see an error stating that a class has a static field whose value may differ between dumptime and runtime, specifically referring to `.null_reset`. This is currently the only case to cause any issues so I figured mentioning it in a comment would be useful. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1903#discussion_r2699958125
