summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2020-03-02 20:22:36 (GMT)
committerGitHub <noreply@github.com>2020-03-02 20:22:36 (GMT)
commitb3b9ade4a3d3fe00d933bcd8fc5c5c755d1024f9 (patch)
tree20c2b9d6a7a68e8c3d8c9bd1f0609bebcb420197 /Misc
parent2d2f85517f8216146a2f888d1ad4d765b3be2339 (diff)
downloadcpython-b3b9ade4a3d3fe00d933bcd8fc5c5c755d1024f9.zip
cpython-b3b9ade4a3d3fe00d933bcd8fc5c5c755d1024f9.tar.gz
cpython-b3b9ade4a3d3fe00d933bcd8fc5c5c755d1024f9.tar.bz2
bpo-39776: Lock ++interp->tstate_next_unique_id. (GH-18746) (#18746)
- Threads created by PyGILState_Ensure() could have a duplicate tstate->id.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2020-03-02-20-12-33.bpo-39776.fNaxi_.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-03-02-20-12-33.bpo-39776.fNaxi_.rst b/Misc/NEWS.d/next/Core and Builtins/2020-03-02-20-12-33.bpo-39776.fNaxi_.rst
new file mode 100644
index 0000000..e5a00bd
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2020-03-02-20-12-33.bpo-39776.fNaxi_.rst
@@ -0,0 +1,6 @@
+Fix race condition where threads created by PyGILState_Ensure() could get a
+duplicate id.
+
+This affects consumers of tstate->id like the contextvar caching machinery,
+which could return invalid cached objects under heavy thread load (observed
+in embedded scenarios).