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

[lworld] [AArch64] TestBufferTearing.java fails with C1

    XMLWordPrintable

    Details

      Description

      For example:

      java.lang.RuntimeException: Inconsistent field values: expected 0 to equal 675128
              at jdk.test.lib.Asserts.fail(Asserts.java:594)
              at jdk.test.lib.Asserts.assertEquals(Asserts.java:205)
              at jdk.test.lib.Asserts.assertEQ(Asserts.java:178)
              at compiler.valhalla.inlinetypes.MyValue.incrementAndCheck(TestBufferTearing.java:81)
              at compiler.valhalla.inlinetypes.TestBufferTearing$Runner.run(TestBufferTearing.java:124)
      java.lang.RuntimeException: Inconsistent field values: expected 0 to equal 555238
              at jdk.test.lib.Asserts.fail(Asserts.java:594)
              at jdk.test.lib.Asserts.assertEquals(Asserts.java:205)
              at jdk.test.lib.Asserts.assertEQ(Asserts.java:178)
              at compiler.valhalla.inlinetypes.MyValue.incrementAndCheck(TestBufferTearing.java:81)
              at compiler.valhalla.inlinetypes.TestBufferTearing$Runner.run(TestBufferTearing.java:125)

      I think the fix is to add a store-store barrier after the initialising stores in GraphBuilder::withfield(), so that those stores cannot be reordered with any store that publishes the object to another thread.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ngasson Nick Gasson
              Reporter:
              ngasson Nick Gasson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: