JDK-8258186 : Replace use of JNI_COMMIT mode with mode 0
  • Type: Enhancement
  • Component: security-libs
  • Sub-Component: javax.crypto:pkcs11
  • Affected Version: 17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-12-14
  • Updated: 2025-01-13
  • Resolved: 2020-12-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17
17 b03Fixed
Related Reports
Cloners :  
Relates :  
Description
In file:

./jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_crypt.c

the JNI_COMMIT mode is used with ReleasePrimitiveArrayCritical. For strict portability this should be using mode 0 to ensure the underlying array is freed in case it was a copy (hotspot doesn't create a copy so this is an enhancement request not a bug, but mode 0 is more generally correct to use.)
Comments
Changeset: cd94606c Author: Valerie Peng <valeriep@openjdk.org> Date: 2020-12-23 20:47:54 +0000 URL: https://git.openjdk.java.net/jdk/commit/cd94606c
23-12-2020