mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
GH-129715: Don't project traces that return to an unknown caller (GH-130024)
This commit is contained in:
parent
72f56654d0
commit
11bb08e4ec
3 changed files with 3 additions and 3 deletions
|
@ -0,0 +1 @@
|
||||||
|
Improve the experimental JIT's handling of returns to unknown callers.
|
|
@ -185,8 +185,7 @@ is_instrumented(int opcode)
|
||||||
{
|
{
|
||||||
assert(opcode != 0);
|
assert(opcode != 0);
|
||||||
assert(opcode != RESERVED);
|
assert(opcode != RESERVED);
|
||||||
assert(opcode != ENTER_EXECUTOR);
|
return opcode != ENTER_EXECUTOR && opcode >= MIN_INSTRUMENTED_OPCODE;
|
||||||
return opcode >= MIN_INSTRUMENTED_OPCODE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
|
|
@ -671,7 +671,7 @@ translate_bytecode_to_trace(
|
||||||
if (trace_stack_depth == 0) {
|
if (trace_stack_depth == 0) {
|
||||||
DPRINTF(2, "Trace stack underflow\n");
|
DPRINTF(2, "Trace stack underflow\n");
|
||||||
OPT_STAT_INC(trace_stack_underflow);
|
OPT_STAT_INC(trace_stack_underflow);
|
||||||
goto done;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uint32_t orig_oparg = oparg; // For OPARG_TOP/BOTTOM
|
uint32_t orig_oparg = oparg; // For OPARG_TOP/BOTTOM
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue