On Thu, 17 Feb 2022 05:21:06 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

>> Bah! But then a comment after that says it does exist again.
>> 
>> There seem to be issues understanding exactly what the concurrent call 
>> sequences can be with this code.
>
> I think you might be confusing `classTrack_activate()` with 
> `classTrack_reset()`. I believe the former has a race but the latter does not.

...and even with the race, I still I think it is safe for a new 
`bagSize(deletedSignatures) == 0` check to be  added outside the lock. The only 
thing `classTrack_activate()` can do to `deletedSignatures` is set it when it 
is null. There is no risk of `deletedSignatures` being deleted and reallocated 
by another thread once you are in `classTrack_processUnloads()`. This is 
because it is called while holding the `handlerLock`, and as I explained 
elsewhere, by the time `classTrack_reset()` is called,  it's no longer possible 
to be in `classTrack_processUnloads()`.

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

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

Reply via email to