RFR: 8279949: JavaThread::_free_handle_block leaks native memory
Leonid Mesnik
lmesnik at openjdk.java.net
Mon Feb 14 16:57:12 UTC 2022
On Mon, 14 Feb 2022 16:27:11 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Please review following fix which delete whole list of JNIHandle blocks in JNIHandleBlock::release_block(...).
>> Also, I added sanity verification of _pop_frame_link to ensure that there are no leaks there.
>>
>> Fix verified with tier1-6. Also, verified that memory leak is not reproduced anymore.
>>
>> Thanks to Vladimir I. for finding exact root cause of problem.
>
> src/hotspot/share/runtime/jniHandles.cpp line 388:
>
>> 386: block = NULL;
>> 387: } else {
>> 388: DEBUG_ONLY(block->set_pop_frame_link(NULL));
>
> Can this also be an assert that the pop_frame_link is null ?
This is a first block which can have non-NULL set_pop_frame_link. So I set it to NULL so assert in the while loop doesn't fail.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7453
More information about the hotspot-runtime-dev
mailing list