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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • repo-valhalla
    • Affects Version/s: repo-valhalla
    • Component/s: hotspot
    • None
    • x86
    • generic

      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

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

              Created:
              Updated:
              Resolved: