[jdk11u-dev] RFR: 8269594: assert(_handle_mark_nesting > 1) failed: memory leak: allocating handle outside HandleMark
Christoph Langer
clanger at openjdk.java.net
Sat Jul 3 09:32:49 UTC 2021
On Thu, 1 Jul 2021 17:20:38 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
> I would like to backport this patch to openjdk11u for parity with Oracle 11.0.13.
>
> This is a low risk patch that fixes potential memory leak. The jdk17 patch applies cleanly.
I think this would be the fix:
diff --git a/src/hotspot/share/runtime/safepoint.cpp b/src/hotspot/share/runtime/safepoint.cpp
index 51e1c9e5bcf..4133a7aa6ac 100644
--- a/src/hotspot/share/runtime/safepoint.cpp
+++ b/src/hotspot/share/runtime/safepoint.cpp
@@ -1192,7 +1192,7 @@ void ThreadSafepointState::handle_polling_page_exception() {
if( nm->is_at_poll_return(real_return_addr) ) {
// See if return type is an oop.
bool return_oop = nm->method()->is_returning_oop();
- HandleMark hm(self);
+ HandleMark hm(thread());
Handle return_value;
if (return_oop) {
// The oop result has been saved on the stack together with all
-------------
PR: https://git.openjdk.java.net/jdk11u-dev/pull/90
More information about the jdk-updates-dev
mailing list