[jdk20] RFR: 8298084: Memory leak in Method::build_profiling_method_data

Coleen Phillimore coleenp at openjdk.org
Fri Dec 9 16:23:06 UTC 2022


This change fixes the MethodData leak by calling the destructor in both the release_C_heap_structures conditionally and by calling the MethodData destructor in the MetadataFactory::free_metadata method.
Thanks to @jcking for working on the patch and discussion.
Tested with tier1-4.

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

Commit messages:
 - 8298084: Memory leak in Method::build_profiling_method_data

Changes: https://git.openjdk.org/jdk20/pull/13/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk20&pr=13&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8298084
  Stats: 35 lines in 6 files changed: 22 ins; 1 del; 12 mod
  Patch: https://git.openjdk.org/jdk20/pull/13.diff
  Fetch: git fetch https://git.openjdk.org/jdk20 pull/13/head:pull/13

PR: https://git.openjdk.org/jdk20/pull/13


More information about the hotspot-dev mailing list