Skip to content

Commit f04ce13

Browse files
committed
pythongh-103082: remove assumption that INSTRUMENTED_LINE is the last instrumented opcode
1 parent d66bc9e commit f04ce13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/instrumentation.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static inline bool
121121
opcode_has_event(int opcode)
122122
{
123123
return (
124-
opcode < INSTRUMENTED_LINE &&
124+
opcode != INSTRUMENTED_LINE &&
125125
INSTRUMENTED_OPCODES[opcode] > 0
126126
);
127127
}
@@ -1202,7 +1202,7 @@ _Py_call_instrumentation_line(PyThreadState *tstate, _PyInterpreterFrame* frame,
12021202
Py_DECREF(line_obj);
12031203
done:
12041204
assert(original_opcode != 0);
1205-
assert(original_opcode < INSTRUMENTED_LINE);
1205+
assert(original_opcode != INSTRUMENTED_LINE);
12061206
assert(_PyOpcode_Deopt[original_opcode] == original_opcode);
12071207
return original_opcode;
12081208
}

0 commit comments

Comments
 (0)