[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 21:04:50 UTC 2021
On Sat, 3 Jul 2021 09:29:26 GMT, Christoph Langer <clanger 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
> @RealCLanger I thought I did a build. Obviously, I did not. Sorry.
> Filed JDK-8269847
Thanks. We need Github Actions to catch those. But seems @shipilev is working on it: https://github.com/openjdk/jdk11u-dev/pull/37
-------------
PR: https://git.openjdk.java.net/jdk11u-dev/pull/90
More information about the jdk-updates-dev
mailing list