diff options
author | Mark Shannon <mark@hotpy.org> | 2023-12-12 19:02:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-12 19:02:24 +0000 |
commit | 956023826a393b5704d3414dcd01f1bcbeaeda15 (patch) | |
tree | 733a71e8bdcbb8630c89375bf6bc1d5e51b5b5c4 /Python/generated_cases.c.h | |
parent | 9898e6104171dcdd88b32776e69ca2cddf515e63 (diff) | |
download | cpython-956023826a393b5704d3414dcd01f1bcbeaeda15.tar.gz cpython-956023826a393b5704d3414dcd01f1bcbeaeda15.zip |
GH-108866: Guarantee forward progress in executors. (GH-113006)
Diffstat (limited to 'Python/generated_cases.c.h')
-rw-r--r-- | Python/generated_cases.c.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index 8f68bc6cb5a..65e6f11f68b 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -2328,20 +2328,18 @@ CHECK_EVAL_BREAKER(); PyCodeObject *code = _PyFrame_GetCode(frame); _PyExecutorObject *executor = (_PyExecutorObject *)code->co_executors->executors[oparg&255]; - int original_oparg = executor->vm_data.oparg | (oparg & 0xfffff00); - JUMPBY(1-original_oparg); - frame->instr_ptr = next_instr; Py_INCREF(executor); if (executor->execute == _PyUOpExecute) { current_executor = (_PyUOpExecutorObject *)executor; GOTO_TIER_TWO(); } - frame = executor->execute(executor, frame, stack_pointer); - if (frame == NULL) { - frame = tstate->current_frame; + next_instr = executor->execute(executor, frame, stack_pointer); + frame = tstate->current_frame; + if (next_instr == NULL) { goto resume_with_error; } - goto enter_tier_one; + stack_pointer = _PyFrame_GetStackPointer(frame); + DISPATCH(); } TARGET(EXIT_INIT_CHECK) { |