On Thu, 21 Aug 2025 15:43:50 GMT, Leonid Mesnik <[email protected]> wrote:
> The void `JvmtiExport::post_method_exit(JavaThread* thread, Method* method, > frame current_frame) `calculates > `bool exception_exit = state->is_exception_detected() && > !state->is_exception_caught();` > to find if method exit normally or by exception. > However, JvmtiExport::post_method_exit( method is not called at all in the > case of exception. See > `void JvmtiExport::notice_unwind_due_to_exception(JavaThread *thread, Method* > method, address location, oop exception, bool in_handler_frame)` > where post_method_exit_inner is called directly. > > The `exception_exit` is true when exception is processed and the current > method is called in the middle of stack unwinding. > > > The fix was a part of > https://github.com/openjdk/jdk/pull/26713 > for > https://bugs.openjdk.org/browse/JDK-8365192 This pull request has now been integrated. Changeset: b7b64bb6 Author: Leonid Mesnik <[email protected]> URL: https://git.openjdk.org/jdk/commit/b7b64bb6c800b45e32ff37b1b92b5927a3b3fb56 Stats: 338 lines in 5 files changed: 320 ins; 7 del; 11 mod 8365937: post_method_exit might incorrectly set was_popped_by_exception and value in the middle of stack unwinding Reviewed-by: dholmes, pchilanomate ------------- PR: https://git.openjdk.org/jdk/pull/26886
