Skip to content

Commit 15bf47b

Browse files
committed
Assert that END_SEND is the source of the branch event for async for
1 parent b3cae50 commit 15bf47b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Python/bytecodes.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,6 +1358,7 @@ dummy_func(
13581358
}
13591359

13601360
tier1 op(_MONITOR_END_ASYNC_FOR, ( -- )) {
1361+
assert((next_instr-oparg)->op.code == END_SEND || (next_instr-oparg)->op.code >= MIN_INSTRUMENTED_OPCODE);
13611362
INSTRUMENTED_JUMP(next_instr-oparg, this_instr+1, PY_MONITORING_EVENT_BRANCH_RIGHT);
13621363
}
13631364

Python/generated_cases.c.h

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)