gh-107265: Ensure de_instrument does not handle ENTER_EXECUTOR (#108366)

This commit is contained in:
Dong-hee Na
2023-08-24 00:45:20 +09:00
committed by GitHub
parent 3f61cf646d
commit 2135bcd3ca

View File

@@ -564,6 +564,7 @@ de_instrument(PyCodeObject *code, int i, int event)
_Py_CODEUNIT *instr = &_PyCode_CODE(code)[i];
uint8_t *opcode_ptr = &instr->op.code;
int opcode = *opcode_ptr;
assert(opcode != ENTER_EXECUTOR);
if (opcode == INSTRUMENTED_LINE) {
opcode_ptr = &code->_co_monitoring->lines[i].original_opcode;
opcode = *opcode_ptr;