summaryrefslogtreecommitdiffstats
path: root/Python/bytecodes.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-05-06 21:21:06 (GMT)
committerGitHub <noreply@github.com>2024-05-06 21:21:06 (GMT)
commit616b745b89a52a1d27123107718f85e65918afdc (patch)
tree3e0c5691ed679c3d0008f87da0e8661077934a6e /Python/bytecodes.c
parent00d913c6718aa365027c6dcf850e8f40731e54fc (diff)
downloadcpython-616b745b89a52a1d27123107718f85e65918afdc.zip
cpython-616b745b89a52a1d27123107718f85e65918afdc.tar.gz
cpython-616b745b89a52a1d27123107718f85e65918afdc.tar.bz2
GH-115709: Invalidate executors when a local variable is changed via frame.f_locals (#118639)
Also fix unrelated assert in debug Tier2/JIT builds.
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r--Python/bytecodes.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index b2a0dc0..b2ddec9 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -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;