diff options
| author | Mark Shannon <mark@hotpy.org> | 2025-05-30 14:11:42 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-30 14:11:42 (GMT) |
| commit | ce6a6371a23dc57ed4257eb102ebfb2827477abf (patch) | |
| tree | ec978baf587fea71499734367ed0e58ee2d33ba6 /Python/bytecodes.c | |
| parent | c600310663277e24607890298e6d9bf7e1d4f584 (diff) | |
| download | cpython-ce6a6371a23dc57ed4257eb102ebfb2827477abf.zip cpython-ce6a6371a23dc57ed4257eb102ebfb2827477abf.tar.gz cpython-ce6a6371a23dc57ed4257eb102ebfb2827477abf.tar.bz2 | |
GH-134879: Fix `INSTRUMENT_FOR_ITER` for list/tuple (#134897)
Fix INSTRUMENT_FOR_ITER for list/tuple
Diffstat (limited to 'Python/bytecodes.c')
| -rw-r--r-- | Python/bytecodes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c index a1f8d36..f02e32f 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -3130,7 +3130,6 @@ dummy_func( if (PyStackRef_IsTaggedInt(null_or_index)) { next = _PyForIter_NextWithIndex(iter_o, null_or_index); if (PyStackRef_IsNull(next)) { - null_or_index = PyStackRef_TagInt(-1); JUMPBY(oparg + 1); DISPATCH(); } @@ -3191,6 +3190,7 @@ dummy_func( JUMPBY(oparg + 1); DISPATCH(); } + null_or_index = PyStackRef_IncrementTaggedIntNoOverflow(null_or_index); INSTRUMENTED_JUMP(this_instr, next_instr, PY_MONITORING_EVENT_BRANCH_LEFT); } else { |
