RFR: 8306456: Don't leak _worklist's memory in PhaseLive::compute [v2]
Johan Sjölen
jsjolen at openjdk.org
Thu Apr 20 12:05:55 UTC 2023
On Wed, 19 Apr 2023 23:26:10 GMT, Dean Long <dlong at openjdk.org> wrote:
>> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix style and make worklist passed in as argument
>
> src/hotspot/share/opto/live.cpp line 92:
>
>> 90: Block_List wl;
>> 91: _worklist = &wl;
>> 92:
>
> Now `_worklist` is a dangling pointer to released stack memory at the end of this method. How do we make sure it isn't used?
I removed the `_worklist` local variable and pass it into the functions that need it instead.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13535#discussion_r1172483362
More information about the hotspot-compiler-dev
mailing list