On Wed, 8 Jul 2026 21:55:19 GMT, Patricio Chilano Mateo 
<[email protected]> wrote:

>> src/hotspot/share/prims/jvmtiEnvBase.cpp line 2476:
>> 
>>> 2474:   }
>>> 2475: 
>>> 2476:   if (_target_jt->at_no_async_entry_count() > 0
>> 
>> The count is set by the target thread but is read here by the current thread 
>> - we need some use of atomics here.
>
> Yes, but this is executed inside the handshake which already provides the 
> required synchronization.

Okay, the fact we rely on that should be documented at the accessor. I don't 
think there is a way to assert it directly - maybe check `is_handshake_safe`?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31759#discussion_r3548371952

Reply via email to