On Thu, 30 Apr 2026 09:43:44 GMT, Anton Artemov <[email protected]> wrote:
>> Hi, please consider the following changes: >> >> this fix adds extra asserts into >> `interpreterRuntime::member_name_arg_or_null()` and slightly changes its >> logic with respect to bad oops. The goal is to detect if the >> `member_name_oop` is not pointing at a member name in fact, which could have >> happened before, when using `MethodHandleHelper.linkToStatic()` with wrong >> order of arguments. A separate test is added. >> >> Tested in tiers 1 - 5. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Anton Artemov has updated the pull request incrementally with one additional > commit since the last revision: > > 8380080: Addressed reviewer's comments. Looks okay to me but need to look at the test as well. src/hotspot/share/interpreter/interpreterRuntime.cpp line 1508: > 1506: guarantee(member_name_oop != nullptr, "member_name_oop should not be > nullptr"); > 1507: guarantee(oopDesc::is_oop(member_name_oop), "member_name_oop should > be an oop"); > 1508: guarantee(java_lang_invoke_MemberName::is_instance(member_name_oop) > || java_lang_invoke_DirectMethodHandle::is_instance(member_name_oop), > "member_name_oop is not MemberName or DMH"); Nit: This line is too long. It is better to split it. ------------- Marked as reviewed by sspitsyn (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/30946#pullrequestreview-4239956845 PR Review Comment: https://git.openjdk.org/jdk/pull/30946#discussion_r3197835230
