RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v2]
Martin Doerr
mdoerr at openjdk.org
Thu Feb 23 04:40:04 UTC 2023
On Wed, 22 Feb 2023 18:31:45 GMT, Maurizio Cimadamore <mcimadamore at 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
More information about the core-libs-dev
mailing list