On Wed, 18 Mar 2026 20:06:51 GMT, Coleen Phillimore <[email protected]> wrote:
>>> Any bytecode can throw due to async exceptions under the right >>> circumstances (these days only single-stepping or at a breakpoint?). >> >> The change in at_safepoint_no_async() disables throwing an async exception >> at any bytecode that cannot trap. I don't know about breakpoints. Do they >> need to disable async exceptions too? >> >> >> JRT_ENTRY(void, InterpreterRuntime::_breakpoint(JavaThread* current, Method* >> method, address bcp)) >> JvmtiExport::post_raw_breakpoint(current, method, bcp); >> JRT_END > >> The _monitor_top check is basically saying if _monitor_top > 0 then >> monitorexit can't throw an exception because it has a matching monitorenter. > > But with async exceptions, the monitorenter/monitorexit bytecodes can trap at > that bci before the bytecode is executed when single stepping. So I'm > starting to believe that the entire switch statement needs to be removed. Why is throwing an exception while single-stepping an issue for monitorenter/monitorexit? They are already marked as can trap. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30171#discussion_r2957025844
