On Wed, 7 Apr 2021 07:20:15 GMT, Robbin Ehn <[email protected]> wrote:
>> src/hotspot/share/prims/jvmtiRawMonitor.cpp line 428:
>>
>>> 426: jt->set_thread_state_fence(_thread_in_native_trans);
>>> 427: SafepointMechanism::process_if_requested(jt);
>>> 428: if (jt->is_interrupted(true)) {
>>
>> A thread must be _thread_in_vm to safely query is_interrupted() as it
>> accesses the threadObj.
>
> Any unsafe (not native/blocked) is fine, therefore I never completed the
> transition.
> I set the state to _thread_in_vm before.
Sorry I was misremembering the restriction, please remove the transition to
_thread_in_vm again (it messes up the comments at lines 436 and 437.)
-------------
PR: https://git.openjdk.java.net/jdk/pull/3191