Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8141865 | emb-9 | Coleen Phillimore | P4 | Resolved | Fixed | team |
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'.
// 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'.
- backported by
-
JDK-8141865 Missing test before a branch when checking for MethodCounters in TemplateTable::branch() on x86
-
- Resolved
-