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

DirectIOTest fails on a system with large block size

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b19
    • OS:
      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

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

                  Dates

                  Created:
                  Updated:
                  Resolved: