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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • repo-valhalla
    • repo-valhalla
    • hotspot
    • None
    • x86
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: