GH-118093: Remove invalidated executors from side exits (GH-121885)

This commit is contained in:
Brandt Bucher 2024-07-24 09:16:30 -07:00 committed by GitHub
parent e9681211b9
commit 794546fd53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 27 additions and 28 deletions

View file

@ -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;
}