RFR: 8353216: Improve VerifyMethodHandles for method handle linkers [v3]

Vladimir Ivanov vlivanov at openjdk.org
Wed Apr 23 02:31:33 UTC 2025


On Fri, 11 Apr 2025 22:48:12 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Add extra verification logic into `MethodHandle::invokeBasic/linkTo*` to ensure that holder classes are properly initialized.
>> 
>> The patch covers x86 and aarch64 platforms.
>> 
>> There are some differences in expectations between invocation modes.
>> While `invokeStatic` assumes a clinit barrier (and `invokeBasic` just requires the holder class to be fully initialized), other invocation modes can only expect that class initialization has been initiated (due to class initialization failures and premature publication, instances of partially initialized classes can be observed).   
>> 
>> Testing: hs-tier1 - hs-tier4
>
> Vladimir Ivanov has updated the pull request incrementally with one additional commit since the last revision:
> 
>   subs -> cmp

Thanks for the review, Dean.

Fixed a merge issue. Please, re-approve.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23950#issuecomment-2822901797


More information about the hotspot-dev mailing list