MappedMemoryUtils.c can generate exceptions like those :
java.io.UncheckedIOException: java.io.IOException: Invalid argument
       at java.base/java.nio.MappedMemoryUtils.force(MappedMemoryUtils.java:105)
       at java.base/java.nio.Buffer$2.force(Buffer.java:890)
       at 
java.base/jdk.internal.misc.ScopedMemoryAccess.forceInternal(ScopedMemoryAccess.java:317)
       at 
java.base/jdk.internal.misc.ScopedMemoryAccess.force(ScopedMemoryAccess.java:305)
       at 
java.base/jdk.internal.foreign.MappedMemorySegmentImpl.force(MappedMemorySegmentImpl.java:92)
       at TestByteBuffer.testMappedSegmentAsByteBuffer(TestByteBuffer.java:327)

(we see this for example on AIX); there is some room for improvement, at least 
the info should be added that msync failed and caused this exception.

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

Commit messages:
 - JDK-8308300

Changes: https://git.openjdk.org/jdk/pull/14054/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14054&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8308300
  Stats: 16 lines in 3 files changed: 13 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/14054.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14054/head:pull/14054

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

Reply via email to