]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-107265: Ensure de_instrument does not handle ENTER_EXECUTOR (#108366)
authorDong-hee Na <donghee.na@python.org>
Wed, 23 Aug 2023 15:45:20 +0000 (00:45 +0900)
committerGitHub <noreply@github.com>
Wed, 23 Aug 2023 15:45:20 +0000 (08:45 -0700)
Python/instrumentation.c

index a7a5b4a5dc5f6e4030988c816ebf19d48d5325d4..f77c2e696f4534fc800d38fc0981f056ee5a4f90 100644 (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;