Skip to content

Commit

Permalink
pythongh-107082: Fix instruction size computation for ENTER_EXECUTOR (p…
Browse files Browse the repository at this point in the history
…ython#107256)

Co-authored-by: Victor Stinner <vstinner@python.org>
  • Loading branch information
2 people authored and jtcave committed Jul 27, 2023
1 parent 2f985e4 commit 659aed0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Python/instrumentation.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,13 @@ _PyInstruction_GetLength(PyCodeObject *code, int offset)
}
assert(opcode != 0);
assert(!is_instrumented(opcode));
if (opcode == ENTER_EXECUTOR) {
int exec_index = _PyCode_CODE(code)[offset].op.arg;
_PyExecutorObject *exec = code->co_executors->executors[exec_index];
opcode = exec->vm_data.opcode;

}
assert(opcode != ENTER_EXECUTOR);
assert(opcode == _PyOpcode_Deopt[opcode]);
return 1 + _PyOpcode_Caches[opcode];
}
Expand Down

0 comments on commit 659aed0

Please sign in to comment.