On Mon, 27 Oct 2025 08:48:40 GMT, Per Minborg <[email protected]> wrote:
>> Ioi Lam has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Added StatelessOopsFinder
>
> src/hotspot/share/cds/cdsHeapVerifier.cpp line 186:
>
>> 184: if (fd->signature()->starts_with("Ljdk/internal/access/") &&
>> 185: fd->signature()->ends_with("Access;")) {
>> 186: // The jdk/internal/access/*Access classes carry no states so
>> they can be safely
>
> This might be true for the time being, but adding such an assumption is a
> constraint for the future and should be documented. Perhaps we should have an
> interface `Access` that the various access classes implement, and where we
> could document this and other constraints of the access classes.
I removed this hard-coded check and instead added
`CDSHeapVerifier::add_shared_secret_accessors()`, which requires all
AOT-initialized accessors to be stateless.
I also added a negative test case for
`SharedSecrets::javaObjectInputFilterAccess`, which is not stateless so it
cannot be initialized in the AOT assembly phase.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27880#discussion_r2467807545