On Fri, 14 May 2021 17:53:15 GMT, Richard Reingruber <[email protected]> wrote:

>> Robbin Ehn has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Fixes for Dan
>
> src/hotspot/share/prims/jvmtiRawMonitor.cpp line 386:
> 
>> 384:     _waiters++;
>> 385:     ret = simple_wait(self, millis);
>> 386:     _waiters--;
> 
> We don't own the monitor yet so you cannot modify `_waiters` here.
> Any reason you moved and duplicated this block?

Good catch! Even if the block wasn't moved we still no longer own the monitor 
after simple_wait.

This is going to be tricky to fix in a clear/clean way as the waiters count has 
to be maintained properly.

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

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

Reply via email to