8000 gh-120321: Add missing "return false" in gen_try_set_executing (gh-14… · python/cpython@6b45381 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 6b45381

Browse files
authored
gh-120321: Add missing "return false" in gen_try_set_executing (gh-144291)
We didn't catch this because of a combination of: 1) falling through to the if-statement below works 2) we only specialized FOR_ITER_GEN for uniquely referenced generators, so we didn't trigger the non-thread-safe behavior.
1 parent 66055d0 commit 6b45381

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Python/ceval_macros.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@ gen_try_set_executing(PyGenObject *gen)
529529
return true;
530530
}
531531
}
532+
return false;
532533
}
533534
#endif
534535
// Use faster non-atomic modifications in the GIL-enabled build and when

0 commit comments

Comments
 (0)
0