diff options
author | Brandt Bucher <brandtbucher@microsoft.com> | 2024-07-24 09:16:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-24 09:16:30 -0700 |
commit | 794546fd53dffa1903a2d0fbe8d745889978f5dc (patch) | |
tree | 417805f6a81561365e2b6b625510a75115a7a5ec /Python/executor_cases.c.h | |
parent | e9681211b9ad11d1c1f471c43bc57cac46814779 (diff) | |
download | cpython-794546fd53dffa1903a2d0fbe8d745889978f5dc.tar.gz cpython-794546fd53dffa1903a2d0fbe8d745889978f5dc.zip |
GH-118093: Remove invalidated executors from side exits (GH-121885)
Diffstat (limited to 'Python/executor_cases.c.h')
-rw-r--r-- | Python/executor_cases.c.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h index e9f73f032bf..2a4428e4a52 100644 --- a/Python/executor_cases.c.h +++ b/Python/executor_cases.c.h @@ -4986,6 +4986,10 @@ _PyOpcode_OpName[target->op.code]); } #endif + if (exit->executor && !exit->executor->vm_data.valid) { + exit->temperature = initial_temperature_backoff_counter(); + Py_CLEAR(exit->executor); + } if (exit->executor == NULL) { _Py_BackoffCounter temperature = exit->temperature; if (!backoff_counter_triggers(temperature)) { @@ -5156,10 +5160,7 @@ #ifndef _Py_JIT current_executor = (_PyExecutorObject*)executor; #endif - if (!((_PyExecutorObject *)executor)->vm_data.valid) { - UOP_STAT_INC(uopcode, miss); - JUMP_TO_JUMP_TARGET(); - } + assert(((_PyExecutorObject *)executor)->vm_data.valid); break; } |