summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorJelle Zijlstra <jelle.zijlstra@gmail.com>2024-10-23 13:45:28 (GMT)
committerGitHub <noreply@github.com>2024-10-23 13:45:28 (GMT)
commitbcc7227ef7fd21aa48c8f1c57922e8beced5737c (patch)
tree85d0e85eb90a6ff74470d246eb6f0bb89a9f1158 /Python
parent5bb0538f6e79acb6d414b7c6c75d3b9a70e9bb6b (diff)
downloadcpython-bcc7227ef7fd21aa48c8f1c57922e8beced5737c.zip
cpython-bcc7227ef7fd21aa48c8f1c57922e8beced5737c.tar.gz
cpython-bcc7227ef7fd21aa48c8f1c57922e8beced5737c.tar.bz2
[3.13] gh-125038: Fix crash after genexpr.gi_frame.f_locals manipulations (GH-125178) (#125846)
(cherry picked from commit 079875e39589eb0628b5883f7ffa387e7476ec06) Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 7d93f2a..d5c42ce 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -5404,6 +5404,7 @@ compiler_sync_comprehension_generator(struct compiler *c, location loc,
if (IS_LABEL(start)) {
depth++;
+ ADDOP(c, LOC(gen->iter), GET_ITER);
USE_LABEL(c, start);
ADDOP_JUMP(c, LOC(gen->iter), FOR_ITER, anchor);
}