RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

Maurizio Cimadamore mcimadamore at openjdk.java.net
Wed Apr 28 13:45:53 UTC 2021


On Wed, 28 Apr 2021 13:08:26 GMT, Chris Hegarty <chegar at openjdk.org> wrote:

>> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Address first batch of review comments
>
> src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/MemorySegment.java line 693:
> 
>> 691:      */
>> 692:     static MemorySegment allocateNative(MemoryLayout layout, ResourceScope scope) {
>> 693:         Objects.requireNonNull(scope);
> 
> Should the allocateNative methods declare that they throw ISE, if the given ResourceScope is not alive?   ( I found myself asking this q, then considering the behaviour of a SegmentAllocator that is asked to allocate after a RS has been closed )

Good point, yes it should

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

PR: https://git.openjdk.java.net/jdk/pull/3699



More information about the security-dev mailing list