openjdk-1.8.0/0012-8301187-Memory-leaks-in-OopMapCache.patch

31 lines
1.1 KiB
Diff

Date: Mon, 5 Jun 2023 20:37:13 +0800
Subject: [PATCH 12/59] 8301187: Memory leaks in OopMapCache
Bug url: https://bugs.openjdk.org/browse/JDK-8301187
---
hotspot/src/share/vm/interpreter/oopMapCache.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hotspot/src/share/vm/interpreter/oopMapCache.cpp b/hotspot/src/share/vm/interpreter/oopMapCache.cpp
index 528906267..bd7d4f100 100644
--- a/hotspot/src/share/vm/interpreter/oopMapCache.cpp
+++ b/hotspot/src/share/vm/interpreter/oopMapCache.cpp
@@ -561,6 +561,7 @@ void OopMapCache::lookup(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, mtClass);
return;
}
@@ -635,5 +636,6 @@ void OopMapCache::compute_one_oop_map(methodHandle method, int bci, InterpreterO
tmp->initialize();
tmp->fill(method, bci);
entry->resource_copy(tmp);
+ tmp->flush();
FREE_C_HEAP_ARRAY(OopMapCacheEntry, tmp, mtInternal);
}
--
2.22.0