On Thu, 9 Jul 2026 01:48:51 GMT, David Holmes <[email protected]> wrote:
>> We could still hit it because a call to `Thread.yield` after grabbing the >> monitor would still reach the unmount logic, i.e. `yieldContinuation`. The >> exception might be processed on the return from `startTransition`. > > But a call to `Thread.yield` would consist of executing many bytecodes and we > should be processing the async-exception at the first of those - ie the > invokestatic - is that not the case? Not necessarily. The async exception will only be processed at the next safepoint poll that allows async exception processing. For `invokestatic`, if the call was already resolved before, there won’t be a poll (except for some possible VM call on method entry due to profiling). We would eventually process the async exception if we stay in the interpreter, because there is at least one poll at the return from `setState(YIELDING)`. But with compiled code and inlining that might not be even the case, so we could get to `startTransition` without any polls in between. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31759#discussion_r3554397338
