From: Dong-hee Na Date: Wed, 23 Aug 2023 15:45:20 +0000 (+0900) Subject: gh-107265: Ensure de_instrument does not handle ENTER_EXECUTOR (#108366) X-Git-Tag: v3.13.0a1~830 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2135bcd3ca9538c6782129f9a5837d62c2036102;p=thirdparty%2FPython%2Fcpython.git gh-107265: Ensure de_instrument does not handle ENTER_EXECUTOR (#108366) --- diff --git a/Python/instrumentation.c b/Python/instrumentation.c index a7a5b4a5dc5f..f77c2e696f45 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;