RFR: 8316661: CompilerThread leaks CodeBlob memory when dynamically stopping compiler thread in non-product [v2]

Vladimir Kozlov kvn at openjdk.org
Thu Sep 21 20:48:11 UTC 2023


On Thu, 21 Sep 2023 20:11:52 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Hi all,
>> 
>>   please review this change to fix a memory leak I found when having `CodeCache::free` call the destructor of `CodeBlob`: when adding the latter, one gets assertion failures that the native memory that `_asm_remarks` and `_dbg_strings` members were not deallocated properly when
>> * stopping a compiler thread due to dynamic compiler thread policy
>> * shutting down the compiler runtime
>> 
>> Testing: gha
>> 
>> Thanks,
>>   Thomas
>
> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Use void* in get_code_heap() to avoid accidentally using the parameter as CodeBlob it isn't any more.

Agree. This is good cleanup.

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

PR Review: https://git.openjdk.org/jdk/pull/15858#pullrequestreview-1638675204


More information about the hotspot-compiler-dev mailing list