RFR: JDK-8298084: Memory leak in Method::build_profiling_method_data

Justin King jcking at openjdk.org
Thu Dec 8 05:02:59 UTC 2022


On Wed, 7 Dec 2022 20:56:53 GMT, David Holmes <dholmes at openjdk.org> wrote:

> Perhaps an oversimplification, but we are missing a destructor call so the solution seems to be to put that destructor call back for that missing case. If we can't always call the destructor then we need to be selective about it.
> 
> Replacing the destructor with release_C_heap_structures and changing from embedded mutex to independent mutex, seems a lot of changes for one missing destructor.

Fair. For now I just reverted back to calling the destructor directly, as that is the path of least resistence to fixing this leak ahead of JDK 20. However, using the destructor like this is very suspect.  I filed https://bugs.openjdk.org/browse/JDK-8298346 to revisit how this is done.

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

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


More information about the hotspot-dev mailing list