From 2135bcd3ca9538c6782129f9a5837d62c2036102 Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Thu, 24 Aug 2023 00:45:20 +0900 Subject: gh-107265: Ensure de_instrument does not handle ENTER_EXECUTOR (#108366) --- Python/instrumentation.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Python/instrumentation.c b/Python/instrumentation.c index a7a5b4a..f77c2e6 100644 --- a/Python/instrumentation.c +++ b/Python/instrumentation.c @@ -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; -- cgit v0.12