RFR: 8284532: Memory leak in BitSet::BitMapFragmentTable in JFR leak profiler
Thomas Stuefe
stuefe at openjdk.java.net
Thu Apr 7 18:20:54 UTC 2022
On Thu, 7 Apr 2022 17:41:46 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
> BitSet::BitMapFragmentTable needs a destructor to cleanup its contents to avoid leaking hashtable entries and bucket array.
Hi Zhengyu,
small remark inline, otherwise this looks okay. This should really be a utility function in BasicHashMap.
What tests did you run?
Cheers, Thomas
Note that there is https://github.com/openjdk/jdk/pull/7964 open too, but it may be easier to get this one in first to keep it easy to backport.
src/hotspot/share/jfr/leakprofiler/chains/bitset.cpp line 41:
> 39: }
> 40: }
> 41: free_buckets();
Doesn't ~BasicHashtable do free_buckets already?
-------------
Changes requested by stuefe (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/8148
More information about the hotspot-jfr-dev
mailing list