8000 GH-128534: Fix behavior of branch monitoring for `async for` by markshannon · Pull Request #130847 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-128534: Fix behavior of branch monitoring for async for #130847

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 7, 2025
Prev Previous commit
Assert that END_SEND is the source of the branch event for async for
  • Loading branch information
markshannon committed Mar 7, 2025
commit 15bf47bee1eb21e289df42542e65ee8117e0ed32
1 change: 1 addition & 0 deletions Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1358,6 +1358,7 @@ dummy_func(
}

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

Expand Down
1 change: 1 addition & 0 deletions Python/generated_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
0