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

Use correct register in aarch64_enc_fast_unlock()

XMLWordPrintable

    • b22
    • aarch64
    • generic

        In aarch64_enc_fast_unlock() (aarch64.ad) we have this piece of code:

            __ ldr(tmp, Address(oop, oopDesc::mark_offset_in_bytes()));
            __ tbnz(disp_hdr, exact_log2(markWord::monitor_value), object_has_monitor);

        The tbnz uses the wrong register - it should really use tmp. disp_hdr has been loaded with the displaced header of the stack-lock, which would never have its monitor bits set, thus the branch will always take the slow path. In the case of !UseHeavyMonitors it is even worse, then disp_hdr will be unitialized.

              rkennke Roman Kennke
              rkennke Roman Kennke
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: