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

Load that bypasses arraycopy has wrong memory state

    Details

    • Subcomponent:
    • Introduced In Build:
      b66
    • Resolved In Build:
      b176
    • Verification:
      Verified

      Backports

        Description

        Following 2 tests currently fail because the load of dst[1] bypasses the arraycopy to load from src but uses the wrong memory state.
            static int test3(int[] src) {
                int[] dst = new int[10];
                System.arraycopy(src, 0, dst, 0, 10);
                src[1] = 0x42;
                return dst[1];
            }

            static int test4(int[] src) {
                int[] dst = (int[])src.clone();
                src[1] = 0x42;
                return dst[1];
            }

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: