Skip to content

Commit 2135bcd

Browse files
authored
gh-107265: Ensure de_instrument does not handle ENTER_EXECUTOR (#108366)
1 parent 3f61cf6 commit 2135bcd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Python/instrumentation.c

+1
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,7 @@ de_instrument(PyCodeObject *code, int i, int event)
564564
_Py_CODEUNIT *instr = &_PyCode_CODE(code)[i];
565565
uint8_t *opcode_ptr = &instr->op.code;
566566
int opcode = *opcode_ptr;
567+
assert(opcode != ENTER_EXECUTOR);
567568
if (opcode == INSTRUMENTED_LINE) {
568569
opcode_ptr = &code->_co_monitoring->lines[i].original_opcode;
569570
opcode = *opcode_ptr;

0 commit comments

Comments
 (0)