diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-07-08 17:09:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-08 17:09:54 (GMT) |
commit | 2f8919ee3c152d6249a0a0dc14c86c0547bfe4b6 (patch) | |
tree | f326657095036be41e5a7875769427faff57161a /Python/executor_cases.c.h | |
parent | bccfd8a53f0c96480526887762ed4f833cd957cb (diff) | |
download | cpython-2f8919ee3c152d6249a0a0dc14c86c0547bfe4b6.zip cpython-2f8919ee3c152d6249a0a0dc14c86c0547bfe4b6.tar.gz cpython-2f8919ee3c152d6249a0a0dc14c86c0547bfe4b6.tar.bz2 |
[3.13] GH-121012: Set index to -1 when list iterators become exhausted in tier 2 (GH-121483) (GH-121494)
Diffstat (limited to 'Python/executor_cases.c.h')
-rw-r--r-- | Python/executor_cases.c.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h index 4e0f73f..8080d20 100644 --- a/Python/executor_cases.c.h +++ b/Python/executor_cases.c.h @@ -2675,8 +2675,11 @@ JUMP_TO_JUMP_TARGET(); } if ((size_t)it->it_index >= (size_t)PyList_GET_SIZE(seq)) { - UOP_STAT_INC(uopcode, miss); - JUMP_TO_JUMP_TARGET(); + it->it_index = -1; + if (1) { + UOP_STAT_INC(uopcode, miss); + JUMP_TO_JUMP_TARGET(); + } } break; } |