Re: RFR: 8284855: Update needed to Cleaners added to jdk.crypto.cryptoki [v5]

2022-04-19 Thread Xue-Lei Andrew Fan
On Tue, 19 Apr 2022 00:12:26 GMT, Brent Christian wrote: >> I think it is safer to add the check for 'hModule'. >> >> >> -if (moduleData != NULL) { >> +if (moduleData != NULL && moduleData->hModule != NULL) { > > That is very safe -- we already checked that `ckpNativeData !=

Re: RFR: 8284855: Update needed to Cleaners added to jdk.crypto.cryptoki [v5]

2022-04-18 Thread Brent Christian
On Sat, 16 Apr 2022 05:28:39 GMT, Xue-Lei Andrew Fan wrote: >> src/jdk.crypto.cryptoki/unix/native/libj2pkcs11/p11_md.c line 274: >> >>> 272: ModuleData *moduleData = jlong_to_ptr(ckpNativeData); >>> 273: >>> 274: if (moduleData != NULL) { >> >> The check should be

Re: RFR: 8284855: Update needed to Cleaners added to jdk.crypto.cryptoki [v5]

2022-04-15 Thread Xue-Lei Andrew Fan
On Fri, 15 Apr 2022 17:51:43 GMT, Valerie Peng wrote: >> Xue-Lei Andrew Fan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> add a reference to the clean up method > > src/jdk.crypto.cryptoki/unix/native/libj2pkcs11/p11_md.c line 274: >

Re: RFR: 8284855: Update needed to Cleaners added to jdk.crypto.cryptoki [v5]

2022-04-15 Thread Xue-Lei Andrew Fan
On Fri, 15 Apr 2022 17:44:08 GMT, Valerie Peng wrote: >> Xue-Lei Andrew Fan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> add a reference to the clean up method > > src/jdk.crypto.cryptoki/unix/native/libj2pkcs11/p11_md.c line 265: >

Re: RFR: 8284855: Update needed to Cleaners added to jdk.crypto.cryptoki [v5]

2022-04-15 Thread Valerie Peng
On Fri, 15 Apr 2022 15:50:19 GMT, Xue-Lei Andrew Fan wrote: >> This is an effort to fix a problem introduced in the fix for >> [JDK-8284368](https://bugs.openjdk.java.net/browse/JDK-8284368), which >> replaced the finalizers in jdk.crypto.cryptoki with Cleaners. However, >> there is a

Re: RFR: 8284855: Update needed to Cleaners added to jdk.crypto.cryptoki [v5]

2022-04-15 Thread Valerie Peng
On Fri, 15 Apr 2022 15:50:19 GMT, Xue-Lei Andrew Fan wrote: >> This is an effort to fix a problem introduced in the fix for >> [JDK-8284368](https://bugs.openjdk.java.net/browse/JDK-8284368), which >> replaced the finalizers in jdk.crypto.cryptoki with Cleaners. However, >> there is a

Re: RFR: 8284855: Update needed to Cleaners added to jdk.crypto.cryptoki [v5]

2022-04-15 Thread Xue-Lei Andrew Fan
> This is an effort to fix a problem introduced in the fix for > [JDK-8284368](https://bugs.openjdk.java.net/browse/JDK-8284368), which > replaced the finalizers in jdk.crypto.cryptoki with Cleaners. However, there > is a problem with the code changes. The Runnables registered with Cleaner >