Details
-
Bug
-
Resolution: Fixed
-
P4
-
8, 11, 17, 21
-
b06
Description
In files:
src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.cpp
src/jdk.hotspot.agent/windows/native/libsaproc/sawindbg.cpp
test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineRetransform/libRedefineRetransform.cpp
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.
src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.cpp
src/jdk.hotspot.agent/windows/native/libsaproc/sawindbg.cpp
test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineRetransform/libRedefineRetransform.cpp
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.
Attachments
Issue Links
- clones
-
JDK-8258186 Replace use of JNI_COMMIT mode with mode 0
- Resolved
- relates to
-
JDK-8258185 [JNI] Clarify the specification in relation to portable use of APIs that involve the Primitive Array Release Modes
- Resolved