RFR: 8362889: [GCC static analyzer] leak in libstringPlatformChars.c [v3]
Matthias Baesken
mbaesken at openjdk.org
Tue Jul 22 08:32:06 UTC 2025
> This is reported by the gcc static analyzer (-fanalyzer); it is just test coding so not very critical but probably should still be adjusted .
>
>
> /jdk/test/jdk/java/lang/String/nativeEncoding/libstringPlatformChars.c:74:12: warning: leak of 'str' [CWE-401] [-Wanalyzer-malloc-leak]
> 74 | return JNU_NewStringPlatform(env, str);
Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
Adjust Java_StringPlatformChars_newString
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/26415/files
- new: https://git.openjdk.org/jdk/pull/26415/files/e2f902f6..de4f7881
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=26415&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=26415&range=01-02
Stats: 9 lines in 1 file changed: 3 ins; 3 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/26415.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26415/head:pull/26415
PR: https://git.openjdk.org/jdk/pull/26415
More information about the core-libs-dev
mailing list