From 4f426d718130e093e21bcfdb17dc69c4c6aa8a07 Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Wed, 23 Aug 2023 22:36:29 +0900 Subject: [PATCH] gh-107265: Ensure de_instrument does not handle ENTER_EXECUTOR --- Python/instrumentation.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Python/instrumentation.c b/Python/instrumentation.c index a7a5b4a5dc5f6e..f77c2e696f4534 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;