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

templateTable_x86.cpp (TemplateTable::if_acmp) not always do correct null check.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: repo-valhalla
    • Fix Version/s: repo-valhalla
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • CPU:
      x86
    • OS:
      generic

      Description

      acmp have to perform nullcheck for both arguments (in Valhalla).
      Right now a very nice hack is used:
          // might be substitutable, test if either rax or rdx is null
          __ testptr(rdx, rax);
          __ jcc(Assembler::zero, (cc == equal) ? not_taken : taken);

      Unfortunately, that hack is valid only if Universe::_verify_oop_bits is not zero.
      TemplateTable should check if Universe::_verify_oop_bits is zero and generates two null checks in that case.
       
      see discussion: https://mail.openjdk.java.net/pipermail/valhalla-dev/2020-November/008237.html

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dsimms David Simms
              Reporter:
              skuksenko Sergey Kuksenko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: