On Thu, 30 Nov 2023 00:14:34 GMT, Patricio Chilano Mateo 
<pchilanom...@openjdk.org> wrote:

>> Serguei Spitsyn has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   review: make new fields volatile, use Atomic for access/update
>
> src/hotspot/share/prims/jvmtiThreadState.cpp line 427:
> 
>> 425:   oop vt = JNIHandles::resolve_external_guard(vthread);
>> 426: 
>> 427:   if (!sync_protocol_enabled()) {
> 
> Isn't the check racy? So we could see that there is no disabler, but before 
> setting anything a disabler can run and succeed. Then we would never notice 
> it and will just return after setting these fields.
> I think you need to check this after setting _VTMS_transition_count and the 
> vthread transition bit.

Thank you for looking at this, Patricio!
Nice catch - fixed now.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16688#discussion_r1410267479

Reply via email to