RFR: 8329665: fatal error: memory leak: allocating without ResourceMark [v2]

Patricio Chilano Mateo pchilanomate at openjdk.org
Thu Jun 27 15:52:18 UTC 2024


On Thu, 27 Jun 2024 13:56:15 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> I am a bit concerned about this fix. Introducing an RM into `frame::oops_interpreted_do` means we cannot assemble anything in RA in the closure code and keep the memory across the RM. But closure code is opaque to the iteration site. Do we have any safeguards against OopClosure using and retaining RA memory? (Because even if no closure does this today, this could sneak in easily)
>
Yes, we can use RM inside the closure, and we do in some cases, but the case you mentioned would be problematic. Since that would be a special usage case I think it should be okay to use C heap instead. But I don't know how to guard against allocating and retaining RA memory in the closure.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18632#issuecomment-2195067808


More information about the hotspot-dev mailing list