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

Thomas Schatzl tschatzl at openjdk.org
Thu Sep 21 20:11:52 UTC 2023


> 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.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/15858/files
  - new: https://git.openjdk.org/jdk/pull/15858/files/6256b301..a489c430

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=15858&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15858&range=00-01

  Stats: 8 lines in 3 files changed: 0 ins; 3 del; 5 mod
  Patch: https://git.openjdk.org/jdk/pull/15858.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15858/head:pull/15858

PR: https://git.openjdk.org/jdk/pull/15858


More information about the hotspot-compiler-dev mailing list