On Fri, 5 Sep 2025 06:22:15 GMT, Leonid Mesnik <[email protected]> wrote:
> This is the second attempt to fix method `post_meth_exit` to correctly set > state and preserve result. > The related fix here: > https://github.com/openjdk/jdk/commit/b7b64bb6c800b45e32ff37b1b92b5927a3b3fb56 > Hope fix became clarere now. > > There 2 problems in this post_meth_exit: > 1) The result is preserved only if > `state->is_enabled(JVMTI_EVENT_METHOD_EXIT)` however transition in the > JRT_BLOCK_END happens always. So there is a risk of loosing method results in > the interp_only mode. > 2) The method `get_jvmti_thread_state` should be called when thread is in vm > state only. > > The fix adds `post_method_exit_transition` to have single exit point with oop > restoration. This pull request has now been integrated. Changeset: 8cd4e7d8 Author: Leonid Mesnik <[email protected]> URL: https://git.openjdk.org/jdk/commit/8cd4e7d856dcc68243505f4e771dc8ab87176584 Stats: 55 lines in 1 file changed: 24 ins; 20 del; 11 mod 8365192: post_meth_exit should be in vm state when calling get_jvmti_thread_state Reviewed-by: mdoerr, dholmes ------------- PR: https://git.openjdk.org/jdk/pull/27112
