Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7903671

jcstress: Update buffer tests for JDK-8318966

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4
    • None
    • None
    • tools
    • None

    Description

      JDK-8320247 changed the requirement for heap buffers to be aligned by 8 bytes. Notably Buffer.alignmentOffset(0, 8) would now throw the exception for non-direct buffers. This means lots of jcstress tests are now failing:

      ```
        Messages:
          Check test failed
          java.lang.ExceptionInInitializerError
           at org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.acqrel.ShortTest_jcstress.jcstress_sanityCheck_API(ShortTest_jcstress.java:80)
           at org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.acqrel.ShortTest_jcstress.sanityCheck(ShortTest_jcstress.java:29)
           at org.openjdk.jcstress.infra.runners.Runner.run(Runner.java:64)
           at org.openjdk.jcstress.ForkedMain.main(ForkedMain.java:79)
          Caused by: java.lang.UnsupportedOperationException: Unit size unsupported for non-direct buffers: 8
           at java.base/java.nio.ByteBuffer.alignmentOffset(ByteBuffer.java:2241)
           at org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.acqrel.ShortTest.<clinit>(ShortTest.java:47)
           ... 4 more


      ```

      Attachments

        Issue Links

          Activity

            People

              shade Aleksey Shipilev
              shade Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: