diff --git a/Python/instrumentation.c b/Python/instrumentation.c index c5c35a07abce8c..1ebab7be2577e0 100644 --- a/Python/instrumentation.c +++ b/Python/instrumentation.c @@ -1586,9 +1586,7 @@ _Py_Instrument(PyCodeObject *code, PyInterpreterState *interp) _Py_CODEUNIT *instr = &_PyCode_CODE(code)[i]; CHECK(instr->op.code != 0); int base_opcode = _Py_GetBaseOpcode(code, i); - if (base_opcode == ENTER_EXECUTOR) { - return -1; - } + assert(base_opcode != ENTER_EXECUTOR); if (opcode_has_event(base_opcode)) { int8_t event; if (base_opcode == RESUME) {