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

@ -4624,6 +4624,10 @@ dummy_func(
_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)) {
@ -4743,7 +4747,7 @@ dummy_func(
#ifndef _Py_JIT
current_executor = (_PyExecutorObject*)executor;
#endif
DEOPT_IF(!((_PyExecutorObject *)executor)->vm_data.valid);
assert(((_PyExecutorObject *)executor)->vm_data.valid);
}
tier2 op(_FATAL_ERROR, (--)) {