RFR: 8373046: Method::get_c2i_unverified_entry() and get_c2i_no_clinit_check_entry() are missing check for abstract method

Vladimir Kozlov kvn at openjdk.org
Thu Dec 4 00:43:04 UTC 2025


On Wed, 3 Dec 2025 22:04:00 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:

>> src/hotspot/share/oops/method.cpp line 180:
>> 
>>> 178: address Method::get_c2i_no_clinit_check_entry() {
>>> 179:   if (is_abstract()) {
>>> 180:     return nullptr;
>> 
>> Why it is `nullptr` instead of `SharedRuntime::get_handle_wrong_method_abstract_stub()`. Add comment.
>
> This is not a new behavior. It was `nullptr` before JDK-8365501:
> 
>   _abstract_method_handler->set_entry_points(SharedRuntime::throw_AbstractMethodError_entry(),
>                                              wrong_method_abstract,
>                                              wrong_method_abstract,
>                                              nullptr);
> 
> I am not sure why it was null and not `wrong_method_abstract`.
> Change that sets `_c2i_no_clinit_check_entry` to null was introduced in https://github.com/openjdk/jdk/commit/242bd67c6c3bb314302502aae19e092e0820290c

Thank you for checking this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28645#discussion_r2587026094


More information about the hotspot-dev mailing list