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

8240795 may cause anti-dependence to be missed

XMLWordPrintable

    • b14
    • Verified

        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.

              roland Roland Westrelin
              roland Roland Westrelin
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: