RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v2]
Martin Doerr
mdoerr at openjdk.org
Thu Feb 23 04:40:07 UTC 2023
On Wed, 22 Feb 2023 18:23:54 GMT, Jorn Vernee <jvernee 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/jdk/internal/foreign/PlatformLayouts.java line 266:
>
>> 264: * The {@code T*} native type.
>> 265: */
>> 266: public static final ValueLayout.OfAddress C_POINTER = ValueLayout.ADDRESS.withBitAlignment(64);
>
> I think this is where the issue with the check in `MemorySegment::copy` comes from. Note how other platforms add a call to `asUnbounded` for the created layout, which makes any pointer boxed using this layout writable/readable (such as the in memory return pointer for upcalls).
Thanks for the hint! You found it pretty quickly. I had missed that when rebasing my early prototype. Fixed.
-------------
PR: https://git.openjdk.org/jdk/pull/12708
More information about the core-libs-dev
mailing list