Skip to content

Commit 04991a2

Browse files
committed
Account for specialization when scanning for branches.
1 parent 0dadfba commit 04991a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/instrumentation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2912,7 +2912,7 @@ branchesiter_next(branchesiterator *bi)
29122912
{
29132913
int offset = bi->bi_offset;
29142914
while (offset < Py_SIZE(bi->bi_code)) {
2915-
_Py_CODEUNIT inst = _PyCode_CODE(bi->bi_code)[offset];
2915+
_Py_CODEUNIT inst = _Py_GetBaseCodeUnit(bi->bi_code, offset);
29162916
int next_offset = offset + _PyInstruction_GetLength(bi->bi_code, offset);
29172917
int event = EVENT_FOR_OPCODE[inst.op.code];
29182918
if (event == PY_MONITORING_EVENT_BRANCH_TAKEN) {

0 commit comments

Comments
 (0)