On Sat, 17 Feb 2024 19:19:48 GMT, Stuart Marks <sma...@openjdk.org> wrote:

>> Daniel Jeliński has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   put reachabilityFence in a finally clause
>
> src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11Key.java line 
> 1537:
> 
>> 1535:                     this.ref.removeNativeKey();
>> 1536:                     // prevent enqueuing SessionKeyRef until 
>> removeNativeKey is done
>> 1537:                     Reference.reachabilityFence(this);
> 
> The approach we are now taking is to put the reachabilityFence() call within 
> the finally-clause of a try-finally statement. This ensures that all paths 
> through the method will pass through the reachability fence, regardless of 
> inlining or other JIT optimizations.

Thanks for the suggestion. Try-finally added.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17870#discussion_r1494333447

Reply via email to