Skip to content

Commit 8b9bd0e

Browse files
committed
pythongh-120321: Add missing "return false" in gen_try_set_executing
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 8b9bd0e

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)