From e2a3b20ca80186a3d3d1a2a9029036b088b3fc9c Mon Sep 17 00:00:00 2001 From: Justin King Date: Fri, 27 Jan 2023 14:58:22 +0000 Subject: [PATCH] 8301187: Memory leaks in OopMapCache Reviewed-by: fparain, coleenp --- src/hotspot/share/interpreter/oopMapCache.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hotspot/share/interpreter/oopMapCache.cpp b/src/hotspot/share/interpreter/oopMapCache.cpp index d18d1614f1441..1aa3415b4ab60 100644 --- a/src/hotspot/share/interpreter/oopMapCache.cpp +++ b/src/hotspot/share/interpreter/oopMapCache.cpp @@ -540,6 +540,7 @@ void OopMapCache::lookup(const methodHandle& method, // at this time. We give the caller of lookup() a copy of the // interesting info via parameter entry_for, but we don't add it to // the cache. See the gory details in Method*.cpp. + tmp->flush(); FREE_C_HEAP_OBJ(tmp); return; } @@ -610,5 +611,6 @@ void OopMapCache::compute_one_oop_map(const methodHandle& method, int bci, Inter tmp->initialize(); tmp->fill(method, bci); entry->resource_copy(tmp); + tmp->flush(); FREE_C_HEAP_OBJ(tmp); }