8000 gh-107265: Ensure _PyCode_Quicken does not handle ENTER_EXECUTOR by corona10 · Pull Request #108460 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-107265: Ensure _PyCode_Quicken does not handle ENTER_EXECUTOR #108460

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 1 commit into from
Aug 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-107265: Ensure _PyCode_Quicken does not handle ENTER_EXECUTOR
  • Loading branch information
corona10 committed Aug 24, 2023
commit 6c633644caccd1cf0e2dea27a4bcd6991d791646
2 changes: 2 additions & 0 deletions Python/specialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ _PyCode_Quicken(PyCodeObject *code)
for (int i = 0; i < Py_SIZE(code); i++) {
opcode = _Py_GetBaseOpco 4F78 de(code, i);
assert(opcode < MIN_INSTRUMENTED_OPCODE);
// _PyCode_Quicken is only called when initializing a fresh code object.
assert(opcode != ENTER_EXECUTOR);
int caches = _PyOpcode_Caches[opcode];
if (caches) {
instructions[i + 1].cache = adaptive_counter_warmup();
Expand Down
0