RFR: 8348668: Prevent first resource cleanup in confined arena from escaping

Chen Liang liach at openjdk.org
Wed Jan 29 11:25:33 UTC 2025


On Tue, 28 Jan 2025 03:20:22 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> src/java.base/share/classes/jdk/internal/foreign/ConfinedSession.java line 112:
>> 
>>> 110:             if (fst != ResourceCleanup.CLOSED_LIST) {
>>> 111:                 ResourceCleanup prev = fst;
>>> 112:                 fst = ResourceCleanup.CLOSED_LIST;
>> 
>> Is there a reason why usage of fst here doesn't prevent successful escape analysis?
>
> Why do you think it should? We never assign the newly allocated resource cleanup to `fst`.

So was the culprit `cleanup.next = fst;`?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23321#discussion_r1931472966


More information about the core-libs-dev mailing list