From dbf0742bf205ec57477373ebd43016383f7e7791 Mon Sep 17 00:00:00 2001 From: Ashutosh Mehra Date: Thu, 4 Dec 2025 05:03:07 +0000 Subject: [PATCH] 8373046: Method::get_c2i_unverified_entry() and get_c2i_no_clinit_check_entry() are missing check for abstract method Reviewed-by: kvn, vlivanov --- src/hotspot/share/oops/method.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hotspot/share/oops/method.cpp b/src/hotspot/share/oops/method.cpp index cb1c8ea37e8..1a2e5f0bee4 100644 --- a/src/hotspot/share/oops/method.cpp +++ b/src/hotspot/share/oops/method.cpp @@ -168,11 +168,17 @@ address Method::get_c2i_entry() { } address Method::get_c2i_unverified_entry() { + if (is_abstract()) { + return SharedRuntime::get_handle_wrong_method_abstract_stub(); + } assert(adapter() != nullptr, "must have"); return adapter()->get_c2i_unverified_entry(); } address Method::get_c2i_no_clinit_check_entry() { + if (is_abstract()) { + return nullptr; + } assert(VM_Version::supports_fast_class_init_checks(), ""); assert(adapter() != nullptr, "must have"); return adapter()->get_c2i_no_clinit_check_entry();