[foreign-memaccess+abi] RFR: 8302556: Find better way to create unsafe native segments [v2]
Jorn Vernee
jvernee at openjdk.org
Wed Feb 15 18:24:24 UTC 2023
On Wed, 15 Feb 2023 15:23:26 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix typo in javadoc
>
> src/java.base/share/classes/jdk/internal/foreign/abi/UpcallStubs.java line 60:
>
>> 58: }
>> 59: });
>> 60: return MemorySegment.ofAddress(entry).reinterpret(arena.scope(), null);
>
> In principle we could just express this using public API if we tweak the semantics for cleanup action to always run in case the scope is found to be already closed.
Yeah, I think that might be better as semantics in general. If the attach fails, don't leak, and run the cleanup action.
-------------
PR: https://git.openjdk.org/panama-foreign/pull/797
More information about the panama-dev
mailing list