GH-115709: Invalidate executors when a local variable is changed via frame.f_locals (#118639)

Also fix unrelated assert in debug Tier2/JIT builds.
This commit is contained in:
Mark Shannon 2024-05-06 22:21:06 +01:00 committed by GitHub
parent 00d913c671
commit 616b745b89
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 30 additions and 4 deletions

View file

@ -2424,6 +2424,9 @@ dummy_func(
opcode = executor->vm_data.opcode;
oparg = (oparg & ~255) | executor->vm_data.oparg;
next_instr = this_instr;
if (_PyOpcode_Caches[_PyOpcode_Deopt[opcode]]) {
PAUSE_ADAPTIVE_COUNTER(this_instr[1].counter);
}
DISPATCH_GOTO();
}
tstate->previous_executor = Py_None;