On Wed, 22 Feb 2023 18:31:45 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> 
wrote:

>> Martin Doerr has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Clean fix for NativeMemorySegmentImpl issue with byteSize 0.
>
> src/java.base/share/classes/java/lang/foreign/MemorySegment.java line 1359:
> 
>> 1357:         long size = elementCount * srcElementLayout.byteSize();
>> 1358:         srcImpl.checkAccess(srcOffset, size, true);
>> 1359:         if (dstImpl instanceof NativeMemorySegmentImpl && 
>> dstImpl.byteSize() == 0) {
> 
> As Jorn said, this change is not acceptable, as it allows bulk copy 
> disregarding the segment real size. In such cases, the issue is always a 
> missing unsafe resize somewhere in the linker code.

Removed this workaround. I'm glad to get rid of it.

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

PR: https://git.openjdk.org/jdk/pull/12708

Reply via email to