RFR: 8365937: post_method_exit might incorrectly set was_popped_by_exception and value in the middle of stack unwinding [v3]
David Holmes
dholmes at openjdk.org
Fri Aug 29 06:05:48 UTC 2025
On Thu, 28 Aug 2025 16:30:34 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:
>> src/hotspot/share/prims/jvmtiExport.cpp line 1843:
>>
>>> 1841: // return a flag when a method terminates by throwing an exception
>>> 1842: // i.e. if an exception is thrown and it's not caught by the current method
>>> 1843: bool exception_exit = state->is_exception_detected() && !state->is_exception_caught();
>>
>> Can we assert this is not an exception exit please.
>
> I am not sure what to check here.
> The 'exception_exit' can be true here. It means that it has been thrown in this thread and not caught yet. But this method is called after exception thrown.
But we are only in this method because the Java method has completed normally so there cannot be a pending exception at this point. ???
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26886#discussion_r2309232727
More information about the hotspot-dev
mailing list