Integrated: 8280901: MethodHandle::linkToNative stub is missing w/ -Xint

Vladimir Ivanov vlivanov at openjdk.java.net
Wed Feb 23 20:32:54 UTC 2022


On Mon, 14 Feb 2022 13:40:32 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

> MethodHandle::linkToNative linker doesn't have a dedicated stub for interpreter. A stub for compiled code is shared and it is invoked through i2c stub when accessed from interpreter. In interpreter-only mode, stubs for compiled code are not generated and linkToNative ends up in a broken state where `Method::_from_interpreted_entry` points to `i2c` stub while `Method::_from_compiled_entry` points to `c2i` stub.
> 
> Proposed fix unconditionally generates a stub for `MethodHandle::linkToNative` case irrespective whether it is a interpreter-only mode or not. 
> 
> Testing: test/jdk/java/foreign/ w/ -Xint

This pull request has now been integrated.

Changeset: f86f38a8
Author:    Vladimir Ivanov <vlivanov at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/f86f38a8afd31c76039206f8f1f33371ad814396
Stats:     6 lines in 2 files changed: 5 ins; 0 del; 1 mod

8280901: MethodHandle::linkToNative stub is missing w/ -Xint

Reviewed-by: shade, kvn

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

PR: https://git.openjdk.java.net/jdk/pull/7459


More information about the hotspot-dev mailing list