diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2023-08-15 15:40:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-15 15:40:05 (GMT) |
commit | 971a4c27517e76155a4a489096eba69c53a7b9e9 (patch) | |
tree | 1a80b5c616d7213fffe0feaed312fae5cf1c140d /Python | |
parent | 09322724319d4c23195300b222a1c0ea720af56b (diff) | |
download | cpython-971a4c27517e76155a4a489096eba69c53a7b9e9.zip cpython-971a4c27517e76155a4a489096eba69c53a7b9e9.tar.gz cpython-971a4c27517e76155a4a489096eba69c53a7b9e9.tar.bz2 |
gh-103082: remove assumption that INSTRUMENTED_LINE is the last instrumented opcode (#107978)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/instrumentation.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/instrumentation.c b/Python/instrumentation.c index b50e8e2..48befed 100644 --- a/Python/instrumentation.c +++ b/Python/instrumentation.c @@ -121,7 +121,7 @@ static inline bool opcode_has_event(int opcode) { return ( - opcode < INSTRUMENTED_LINE && + opcode != INSTRUMENTED_LINE && INSTRUMENTED_OPCODES[opcode] > 0 ); } @@ -1202,7 +1202,7 @@ _Py_call_instrumentation_line(PyThreadState *tstate, _PyInterpreterFrame* frame, Py_DECREF(line_obj); done: assert(original_opcode != 0); - assert(original_opcode < INSTRUMENTED_LINE); + assert(original_opcode != INSTRUMENTED_LINE); assert(_PyOpcode_Deopt[original_opcode] == original_opcode); return original_opcode; } |