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

Tobias Hartmann thartmann at openjdk.org
Mon Sep 25 05:41:13 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.

Looks good to me.

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

Marked as reviewed by thartmann (Reviewer).

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


More information about the hotspot-compiler-dev mailing list