[15] RFR(XS): 8244946: fatal error: memory leak: allocating without ResourceMark with -XX:+Verbose -Xlog:methodhandles
Christian Hagedorn
christian.hagedorn at oracle.com
Wed May 13 15:10:40 UTC 2020
Hi
Please review the following patch:
https://bugs.openjdk.java.net/browse/JDK-8244946
http://cr.openjdk.java.net/~chagedorn/8244946/webrev.00/
This simply fixes a missing ResourceMark required to call
Klass::oop_print_on().
The reason for the missing ResourceMark in oop_print_on() is stated in
the RFR [1] for JDK-8222893 [2] which removed the ResourceMark due to a
bug:
"print functions with outputStream should not have a ResourceMark
because you could call it with a LogStream or stream that was allocated
outside the resource mark. The caller needs the ResourceMark."
There are other places like Klass::print_on(outputStream*) where this is
still the case. Should we file an RFE to clean these up?
Thank you!
Best regards,
Christian
[1]
https://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2019-May/034095.html
[2] https://bugs.openjdk.java.net/browse/JDK-8222893
More information about the hotspot-dev
mailing list