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

Thomas Schatzl tschatzl at openjdk.org
Thu Sep 21 16:01:56 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

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

Commit messages:
 - Make CodeBlob::~CodeBlob virtual as it should be
 - 8316661-initial-commit

Changes: https://git.openjdk.org/jdk/pull/15858/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15858&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8316661
  Stats: 50 lines in 4 files changed: 19 ins; 29 del; 2 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