mirror of https://github.com/python/cpython
gh-107265: Ensure de_instrument does not handle ENTER_EXECUTOR (#108366)
This commit is contained in:
parent
3f61cf646d
commit
2135bcd3ca
|
@ -564,6 +564,7 @@ de_instrument(PyCodeObject *code, int i, int event)
|
||||||
_Py_CODEUNIT *instr = &_PyCode_CODE(code)[i];
|
_Py_CODEUNIT *instr = &_PyCode_CODE(code)[i];
|
||||||
uint8_t *opcode_ptr = &instr->op.code;
|
uint8_t *opcode_ptr = &instr->op.code;
|
||||||
int opcode = *opcode_ptr;
|
int opcode = *opcode_ptr;
|
||||||
|
assert(opcode != ENTER_EXECUTOR);
|
||||||
if (opcode == INSTRUMENTED_LINE) {
|
if (opcode == INSTRUMENTED_LINE) {
|
||||||
opcode_ptr = &code->_co_monitoring->lines[i].original_opcode;
|
opcode_ptr = &code->_co_monitoring->lines[i].original_opcode;
|
||||||
opcode = *opcode_ptr;
|
opcode = *opcode_ptr;
|
||||||
|
|
Loading…
Reference in New Issue