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

8240795 may cause anti-dependence to be missed

    XMLWordPrintable

    Details

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

      Backports

        Description

        I see that with the following loop

        for (int i = 0; i < stop; i ++) {
          if (flag1) {
            System.arraycopy(src, 0, dst, 0, j);
            v = dst[9];
            if (flag2) {
              src[9] = 0x42;
            }
          }
        }

        the value of v that's loaded can be wrong (0x42 when flag2 is true) because of missing anti-dependence between the load (once transformed to a load on src) and store.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                roland Roland Westrelin
                Reporter:
                roland Roland Westrelin
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: