RFR: 8353189: [ASAN] memory leak after 8352184 [v2]

Jiangli Zhou jiangli at openjdk.org
Tue Apr 8 03:01:29 UTC 2025


On Mon, 7 Apr 2025 13:14:37 GMT, SendaoYan <syan at openjdk.org> wrote:

>> Hi all,
>> 
>> This PR will try to fix memory leak after JDK-8352184. which re-do [JDK-8352184](https://bugs.openjdk.org/browse/JDK-8352184) using the original, purely static uses of the various description strings, as @jianglizhou had proposed.
>> 
>> Additional testing:
>> 
>> - [x] jtreg tests(include tier1/2/3 etc.) on linux-x64
>> - [x] jtreg tests(include tier1/2/3 etc.) on linux-aarch64
>> - [x] full `java -version` tests, the test shell script show as below.
>> 
>> [JDK-8353189.sh.txt](https://github.com/user-attachments/files/19632637/JDK-8353189.sh.txt)
>
> SendaoYan has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Use static static string instead of assemble string dynamic
>  - Revert "8353189: [ASAN] memory leak after 8352184"
>    
>    This reverts commit 71bc3ad34ebd57cc6642dfede18cec65e3694dd1.

src/hotspot/share/runtime/abstract_vm_version.cpp line 140:

> 138: 
> 139: 
> 140: const char* Abstract_VM_Version::vm_info_string() {

For future benefit, how about also adding a comment explain why we avoid dynamic memory allocation for the vm_info_string here?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24299#discussion_r2032299122


More information about the hotspot-dev mailing list