On Sat, 20 May 2023 16:03:20 GMT, Leonid Mesnik <[email protected]> wrote:
>> Serguei Spitsyn has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> minor tweak in libForceEarlyReturnTest.cpp
>
> src/hotspot/share/prims/jvmtiEnvBase.cpp line 2078:
>
>> 2076: return; /* JVMTI_ERROR_THREAD_NOT_ALIVE (default) */
>> 2077: }
>> 2078: if (!self) {
>
> Can't we have any racing by removing this check?
> We are checking thread state before handshake operation, but it is changed
> before thread start execution of this handshake?
Thank you for the comment.
No, there can be no race here. If a JVMTI function is called (or not called) on
the current thread (eg. the target thread is current) then it can't change
while the JVMTI function is executed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14067#discussion_r1201618998