JDK-8300117 : Replace use of JNI_COMMIT mode with mode 0
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7,8,11,17,19,20,21
  • Priority: P4
  • Status: New
  • Resolution: Unresolved
  • OS: os_x
  • Submitted: 2023-01-13
  • Updated: 2023-01-13
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.
Other
tbdUnresolved
Related Reports
Relates :  
Description
In files:

src/java.desktop/macosx/native/libawt_lwawt/awt/CClipboard.m
src/java.desktop/macosx/native/libawt_lwawt/awt/CDropTarget.m

the JNI_COMMIT mode is used with ReleaseLongArrayElements / ReleaseByteArrayElements. This mode does not release memory allocated by the corresponding GetXXXArrayElements functions and creates a memory leak. This code should be using mode 0 to ensure the underlying array is freed.