[15] RFR(XS): 8244946: fatal error: memory leak: allocating without ResourceMark with -XX:+Verbose -Xlog:methodhandles
Christian Hagedorn
christian.hagedorn at oracle.com
Thu May 14 08:00:47 UTC 2020
Hi David, hi Daniel
Thank you for your reviews!
On 13.05.20 17:54, Daniel D. Daugherty wrote:
> Not your bug, but the comment has two typos:
>
> s/by safer/but safer/
> s/unexpensive/inexpensive/
Thanks, fixed it.
On 14.05.20 01:51, David Holmes wrote:
> src/hotspot/cpu/x86/methodHandles_x86.cpp
>
> Given all of the code is inside:
>
> 504 if (Verbose) {
>
> I would just move the ResourceMark to the top of that block. We are
> going to use it unconditionally, and we are not releasing it until the
> end of the method regardless. That avoids the potential concern Dan
> raised about extending the scope of the PRESERVE_EXCEPTION_MARK.
This sounds reasonable. I moved it to the top of that block.
>> There are other places like Klass::print_on(outputStream*) where this
>> is still the case. Should we file an RFE to clean these up?
>
> Obviously we don't have any tests running in a mode that causes this
> code to be executed, so yes it is probably a good idea to take a closer
> look at other call-sites and file a RFE if needed.
Yes, I filed one to take a closer look at these [1].
I included the changes in a new webrev:
http://cr.openjdk.java.net/~chagedorn/8244946/webrev.01/
Best regards,
Christian
[1] https://bugs.openjdk.java.net/browse/JDK-8244999
More information about the hotspot-dev
mailing list