[foreign-memaccess] RFR: JDK-8243089: Foreign address manipulation always fails with exception
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Fri Apr 17 18:19:25 UTC 2020
This patch fixes a silly mistake in Foreign implementation. Instead of checking whether `MemoryAddress::segment`
returns null, we instead check if it returns `AbstractMemorySegmentImpl::NOTHING`.
I've also added positive test, to make sure we catch these issues from now on.
-------------
Commit messages:
- Fix behavior of Foreign::withSize/Foreign::asMallocSegment
Changes: https://git.openjdk.java.net/panama-foreign/pull/118/files
Webrev: https://webrevs.openjdk.java.net/panama-foreign/118/webrev.00
Issue: https://bugs.openjdk.java.net/browse/JDK-JDK-8243089
Stats: 28 lines in 3 files changed: 26 ins; 0 del; 2 mod
Patch: https://git.openjdk.java.net/panama-foreign/pull/118.diff
Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/118/head:pull/118
PR: https://git.openjdk.java.net/panama-foreign/pull/118
More information about the panama-dev
mailing list