On Fri, 19 May 2023 06:58:49 GMT, Matthias Baesken <mbaes...@openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: 69f508a2
Author:    Matthias Baesken <mbaes...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/69f508a2ac344eb61cef7be985348873b8265171
Stats:     18 lines in 3 files changed: 13 ins; 0 del; 5 mod

8308300: enhance exceptions in MappedMemoryUtils.c

Reviewed-by: alanb, clanger, bpb

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

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

Reply via email to