RFR: 8310264: In PhaseChaitin::Split defs and phis are leaked [v4]
Tobias Hartmann
thartmann at openjdk.org
Fri Jun 23 07:07:07 UTC 2023
On Tue, 20 Jun 2023 10:35:25 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
>
> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
>
> Be conservative in sizing to be close to original behavior
Good catch! Looks good to me otherwise.
src/hotspot/share/opto/reg_split.cpp line 575:
> 573: // Keep track of DEFS & Phis for later passes
> 574: Node_List defs{split_arena, 8};
> 575: Node_List phis{split_arena, 16};
Why do you use aggregate initialization instead of constructor invocation here?
-------------
Marked as reviewed by thartmann (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/14530#pullrequestreview-1494513550
PR Review Comment: https://git.openjdk.org/jdk/pull/14530#discussion_r1239398494
More information about the hotspot-compiler-dev
mailing list