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

C1: G1 barriers don't preserve FP registers

    Details

    • Subcomponent:
    • Resolved In Build:
      b114
    • Verification:
      Verified

      Backports

        Description

        I have a code which looks like:
            public void go() {
                final float FINAL = getValue();
                for (...) {
                     if (FINAL != getValue()) {
                         System.out.println("FAIL");
                     }
                }
             }
             float getValue() {
                 return 6;
             }

        Being run with G1 and -Xcomp the value of the FINAL variable may change...

        The source is attached.
        # java -Xmx300m -XX:+UseG1GC -Xmixed TestFinalFloat
        Final value: 6.0
        Still passed
        Still passed
        Still passed
        Final values has changed: -8.532477E32
        TEST FAILED

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  vlivanov Vladimir Ivanov
                  Reporter:
                  dfazunen Dmitry Fazunenko (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: