Skip to content

Commit

Permalink
Return -1 if there is ENTER_EXECUTOR
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 committed Sep 1, 2023
1 parent 9ddbfe7 commit 1199dfe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Python/instrumentation.c
Original file line number Diff line number Diff line change
Expand Up @@ -1586,7 +1586,9 @@ _Py_Instrument(PyCodeObject *code, PyInterpreterState *interp)
_Py_CODEUNIT *instr = &_PyCode_CODE(code)[i];
CHECK(instr->op.code != 0);
int base_opcode = _Py_GetBaseOpcode(code, i);
assert(base_opcode != ENTER_EXECUTOR);
if (base_opcode == ENTER_EXECUTOR) {
return -1;
}
if (opcode_has_event(base_opcode)) {
int8_t event;
if (base_opcode == RESUME) {
Expand Down

0 comments on commit 1199dfe

Please sign in to comment.