[3.13] gh-125038: Fix crash after genexpr.gi_frame.f_locals manipulations (GH-125178) (#125846)

(cherry picked from commit 079875e395)

Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
This commit is contained in:
Jelle Zijlstra 2024-10-23 06:45:28 -07:00 committed by GitHub
parent 5bb0538f6e
commit bcc7227ef7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 77 additions and 0 deletions

View file

@ -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);
}