RFR: 8280901: MethodHandle::linkToNative stub is missing w/ -Xint [v2]

Vladimir Ivanov vlivanov at openjdk.java.net
Tue Feb 22 11:49:26 UTC 2022


> 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

Vladimir Ivanov has updated the pull request incrementally with one additional commit since the last revision:

  Regression test

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7459/files
  - new: https://git.openjdk.java.net/jdk/pull/7459/files/50f68960..17df1875

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7459&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7459&range=00-01

  Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7459.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7459/head:pull/7459

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


More information about the hotspot-dev mailing list