https://github.com/python/cpython/commit/6b4538192ddac518b9c15b3f79445c964330dee3
commit: 6b4538192ddac518b9c15b3f79445c964330dee3
branch: main
author: Sam Gross <[email protected]>
committer: colesbury <[email protected]>
date: 2026-01-27T16:38:50-05:00
summary:
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.
files:
M Python/ceval_macros.h
diff --git a/Python/ceval_macros.h b/Python/ceval_macros.h
index d791ba0e8eca97..79ec80329165dd 100644
--- a/Python/ceval_macros.h
+++ b/Python/ceval_macros.h
@@ -529,6 +529,7 @@ gen_try_set_executing(PyGenObject *gen)
return true;
}
}
+ return false;
}
#endif
// Use faster non-atomic modifications in the GIL-enabled build and when
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]