RFR: 8353216: Improve VerifyMethodHandles for method handle linkers [v4]
Dean Long
dlong at openjdk.org
Thu Apr 24 00:54:44 UTC 2025
On Wed, 23 Apr 2025 02:31:33 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 10 additional commits since the last revision:
>
> - fix merge
> - Merge branch 'master' into mh.verify_method
> - subs -> cmp
> - assert_different_registers on x86
> - jcc->jccb
> - No need to care about x86-32 anymore
> - A branch too far...
> - Specialize for linker type
> - Limit to concrete methods
> - Verify method holder
Marked as reviewed by dlong (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/23950#pullrequestreview-2789032938
More information about the hotspot-dev
mailing list