RFR: JDK-8308300: enhance exceptions in MappedMemoryUtils.c [v2]

Alan Bateman alanb at openjdk.org
Fri May 19 09:54:49 UTC 2023


On Fri, 19 May 2023 09:46:59 GMT, Matthias Baesken <mbaesken at 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.
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Change comments and madvise exception text

Marked as reviewed by alanb (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/14054#pullrequestreview-1434127237


More information about the nio-dev mailing list