Skip to content

Commit 971a4c2

Browse files
authored
gh-103082: remove assumption that INSTRUMENTED_LINE is the last instrumented opcode (#107978)
1 parent 0932272 commit 971a4c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/instrumentation.c

Lines changed: 2 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy