[jdk17] RFR: 8269285: Crash/miscompile in CallGenerator::for_method_handle_inline after JDK-8191998

Vladimir Ivanov vlivanov at openjdk.java.net
Wed Jun 30 10:34:36 UTC 2021


On Wed, 30 Jun 2021 10:08:16 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> Would such filtering break when arg_type and sig_type are both interfaces?

What particular scenario do you have in mind? The check is performend against `sig_klass` only, so it covers the case when both `arg_type` and `sig_type` represent interfaces. Interface types aren't trusted in bytecode, so the worst case scenario is there'll be a repeated subtype check at runtime needed later in callee. 

MethodHandle invocation performs an adhoc type check between call site signature and MethodHandle type (`MH.type() == MT_call_site`) and the relevant logic in `CallGenerator::for_method_handle_inline()` reifies its effects on argument types in IR.

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

PR: https://git.openjdk.java.net/jdk17/pull/169


More information about the hotspot-compiler-dev mailing list