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

aarch64: fix typo in verify_oop_array

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b07
    • CPU:
      aarch64
    • OS:
      generic

      Backports

        Description

        In aarch64 verify_oop_array, we scan over array at 'a' for 'count' oops, verifying each one.
        The step for the loop should be one for each oop instead of 'size'. We may miss verifying some oops in the array if we set the step to 'size'.
        Also, we should use 'temp' instead of r16 for the compressed oop case. Register r16 defined but not used in this function.

        Proposed fix:

        diff --git a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
        index 89a4330137..b94e292404 100644
        --- a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
        +++ b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
        @@ -1282,10 +1282,10 @@ class StubGenerator: public StubCodeGenerator {
               __ ldr(temp, Address(a, rscratch2, Address::lsl(exact_log2(size))));
               __ verify_oop(temp);
             } else {
        - __ ldrw(r16, Address(a, rscratch2, Address::lsl(exact_log2(size))));
        + __ ldrw(temp, Address(a, rscratch2, Address::lsl(exact_log2(size))));
               __ decode_heap_oop(temp); // calls verify_oop
             }
        - __ add(rscratch2, rscratch2, size);
        + __ add(rscratch2, rscratch2, 1);
             __ b(loop);
             __ bind(end);
           }

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                fyang Fei Yang
                Reporter:
                fyang Fei Yang
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: