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

Missing test before a branch when checking for MethodCounters in TemplateTable::branch() on x86

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b81
    • CPU:
      x86

      Backports

        Description

         TemplateTable::branch() on x86 has the following code for checking if the MethodCounters exist:

           // check if MethodCounters exists
            Label has_counters;
            __ movptr(rax, Address(rcx, Method::method_counters_offset()));
            __ testptr(rax, rax);
            __ jcc(Assembler::notZero, has_counters);
            __ push(rdx);
            __ push(rcx);
            __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::build_method_counters),
                       rcx);
            __ pop(rcx);
            __ pop(rdx);
            __ movptr(rax, Address(rcx, Method::method_counters_offset()));
            __ jcc(Assembler::zero, dispatch);
            __ bind(has_counters);

        After calling InterpreterRuntime::build_method_counters() and reloading Method::_method_counters there's no test of the loaded value before the branch to 'dispatch'.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  simonis Volker Simonis
                  Reporter:
                  simonis Volker Simonis
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: