RFR: 8368199: Add @AOTSafeClassInitializer to jdk.internal.access.SharedSecrets [v3]
Dan Heidinga
heidinga at openjdk.org
Tue Oct 28 14:01:34 UTC 2025
On Tue, 28 Oct 2025 04:06:57 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>>> The ObjectInputStreamReadString interface should just be merged into ObjectInputStreamAccess.
>>
>> I agree. This seems better than using two separate Access interfaces with two separate lambdas. Maybe this should be done in a separate RFE?
>
>> Is there a particular subset of the SharedSecrets accessors that we want to allow to be set during the assembly phase?
>
> @DanHeidinga , I updated the code to disallow any AOT-initialized accessors that are not stateless. See `CDSHeapVerifier::SharedSecretsAccessorFinder::do_field()`. This check should cover all existing use of Lambdas in setting the accessors, as well as future changes in the core lib that might add other types of states in the accessors.
Can you update the comment on `SharedSecrets.java` to indicate that lambdas aren't safe to pre-initialize in this context?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27880#discussion_r2469685015
More information about the hotspot-runtime-dev
mailing list