RFR: 8310264: In PhaseChaitin::Split defs and phis are leaked
Aleksey Shipilev
shade at openjdk.org
Mon Jun 19 07:32: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
Looking at https://github.com/openjdk/jdk/commit/f0d08c04f1312045c5e6f77935b04fe90967a186 -- it would seem that `def` and `phi` just missed the allocation in `split_arena`? I think it would a cleaner/safer to change `def`/`phi` to be allocated in `split_arena`, rather than doing the blank `ResourceMark` here. Are we sure nothing RA-allocated is used after we leave `Split`?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14530#issuecomment-1596656404
More information about the hotspot-compiler-dev
mailing list