RFR: 8300024: Replace use of JNI_COMMIT mode with mode 0 [v2]
Daniel Jeliński
djelinski at openjdk.org
Fri Jan 13 07:16:35 UTC 2023
> Please review this patch that fixes a few memory leaks in JNI code.
>
> [The latest documentation](https://docs.oracle.com/en/java/javase/17/docs/specs/jni/functions.html#releaseprimitivetypearrayelements-routines) of JNI functions makes an explicit note about the use of JNI_COMMIT:
>
>> If `JNI_COMMIT` is passed as the `mode` argument when `elems` is a copy of the elements in `array`, then a final call to *Release<PrimitiveType\>ArrayElements* passing a `mode` argument of "0" or `JNI_ABORT`, should be made to free the `elems` buffer
>
> No new regression test. I manually verified the Linux fix using ClhdsbPstack test in root mode. Also, tier1-2 tests on mach5 continue to pass.
Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision:
MacOS fix
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/11963/files
- new: https://git.openjdk.org/jdk/pull/11963/files/cecacd13..bea9f536
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=11963&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=11963&range=00-01
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/11963.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11963/head:pull/11963
PR: https://git.openjdk.org/jdk/pull/11963
More information about the serviceability-dev
mailing list