RFR: 8351748: Classes of method handles in AOT cache should be AOT-inited
Vladimir Ivanov
vlivanov at openjdk.org
Wed Mar 12 17:22:58 UTC 2025
On Wed, 12 Mar 2025 04:09:24 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> Whenever we store a MethodHandle in the AOT cache, we need to make sure that the class of this method is aot-initialized. Otherwise, the JVM might execute a BSM without first initializing the class of this BSM.
>
> Please see the bug report for detail analysis.
>
> I also fixed a problem in related logging code.
IMO a safer alternative is to unconditionally keep all clinit barriers during assembly phase (irrespective of whether relevant class is initialized or not).
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24004#issuecomment-2718592566
More information about the hotspot-runtime-dev
mailing list