Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8264821

DirectIOTest fails on a system with large block size

    XMLWordPrintable

Details

    • b19
    • linux

    Backports

      Description

        The test fails with following exception if 'alignment' returned by FileStore::getBlockSize exceeds the test constant SIZE:

        java.nio.BufferOverflowException
        at java.base/java.nio.Buffer.nextPutIndex(Buffer.java:
        at java.base/java.nio.DirectByteBuffer.put(DirectByteBuffer.java:
        at DirectIOTest.testWrite(DirectIOTest.java:
        at DirectIOTest.main(DirectIOTest.java:

        This happens due to ByteBuffer.allocateDirect(SIZE + alignment - 1) .alignedSlice(alignment) returns zero-length buffer.

        Attachments

          Issue Links

            Activity

              People

                bpb Brian Burkhalter
                snazarki Sergey Nazarkin
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: