On Tue, 17 Dec 2024 17:35:52 GMT, Serguei Spitsyn <[email protected]> wrote:
>> src/hotspot/share/interpreter/interpreterRuntime.cpp line 580:
>>
>>> 578: // notify debugger of an exception catch
>>> 579: // (this is good for exceptions caught in native methods as well)
>>> 580: if (JvmtiExport::can_post_on_exceptions() ||
>>> JvmtiExport::can_post_frame_pop()) {
>>
>> This doesn't seem like it is related to ClearAllFramePops.
>
> Yes, it does not relate to the `ClearAllFramePops` directly. But it is needed
> for correctness of the `NotifyFramePop`. I do not feel it is worth to
> separate this change.
So this is a long standing bug hidden by the fact that if
`can_post_frame_pop()` is true, then so is `can_post_on_exceptions()`:
JvmtiExport::set_can_post_on_exceptions(
avail.can_generate_exception_events ||
avail.can_generate_frame_pop_events ||
avail.can_generate_method_exit_events);
JvmtiExport::set_can_post_frame_pop(avail.can_generate_frame_pop_events);
Or you could argue that the existing code is correct because it already
captures `can_post_frame_pop()`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22744#discussion_r1889259920