RFR: 8310264: In PhaseChaitin::Split defs and phis are leaked
Christian Hagedorn
chagedorn at openjdk.org
Mon Jun 19 06:23:06 UTC 2023
On Sat, 17 Jun 2023 16:08:53 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
> Hi,
>
> `defs` and `phis` are leaked as they are resource allocated but not protected by a `ResourceMark`. The intention might have been for these to also live in the `split_arena`.. This change is the most conservative one, however, and does fix the memory leak.
>
> Please consider, thanks.
>
> Johan
Looks good! I'm wondering, why we don't stack allocate both `Node_List` instead of `new Node_List()`. But regardless of that, we should indeed add a `ResourceMark`.
-------------
Marked as reviewed by chagedorn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/14530#pullrequestreview-1485480358
More information about the hotspot-compiler-dev
mailing list