RFR: 8362889: [GCC static analyzer] leak in libstringPlatformChars.c [v4]

Matthias Baesken mbaesken at openjdk.org
Wed Jul 23 07:15:04 UTC 2025


On Tue, 22 Jul 2025 14:01:56 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>> 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:
> 
>   Add ReleasePrimitiveArrayCritical

Thanks for the reviews !

-------------

PR Comment: https://git.openjdk.org/jdk/pull/26415#issuecomment-3106150824


More information about the core-libs-dev mailing list