On Wed, 31 Mar 2021 03:40:49 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> Robbin Ehn has updated the pull request with a new target base due to a 
>> merge or a rebase. The pull request now contains two commits:
>> 
>>  - Merge branch 'master' into SuspendInHandshake
>>  - 8257831: Suspend with handshake (review baseline)
>
> src/hotspot/share/prims/jvmtiEnv.cpp line 1009:
> 
>> 1007:   if (self_index >= 0) {
>> 1008:     if (!JvmtiSuspendControl::suspend(current)) {
>> 1009:       results[self_index] = JVMTI_ERROR_THREAD_NOT_ALIVE;
> 
> Surely impossible when dealing with the current thread!

Another thread can win the race to suspend the current thread (if 
claim_handshake() in try_process() fails). Then JVMTI_ERROR_THREAD_SUSPENDED 
should be returned.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3191

Reply via email to