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

IndexOutOfBoundsException in HeapByteBufferTest.java

    Details

    • Subcomponent:
    • Resolved In Build:
      b64
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        During some jtreg testing I got next failure on macos-x64 fastdebug:

        command: main -XX:+UnlockDiagnosticVMOptions -XX:-UseUnalignedAccesses HeapByteBufferTest
        reason: User specified action: run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:-UseUnalignedAccesses HeapByteBufferTest
        elapsed time (seconds): 4.259
        STDOUT:
        STDERR:
        java.lang.IndexOutOfBoundsException
        at java.nio.Buffer.checkIndex(Buffer.java:546)
        at java.nio.HeapByteBuffer.getShort(HeapByteBuffer.java:331)
        at MyByteBuffer.getShort(HeapByteBufferTest.java:214)
        at HeapByteBufferTest.step(HeapByteBufferTest.java:300)
        at HeapByteBufferTest.run(HeapByteBufferTest.java:355)
        at HeapByteBufferTest.main(HeapByteBufferTest.java:370)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


        I was not able to reproduce it. We need to use our random generator Utils.getRandomInstance() to know what seed to use for reproduction.
        And also instead of random test all range of indexes.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  thartmann Tobias Hartmann
                  Reporter:
                  kvn Vladimir Kozlov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: