summaryrefslogtreecommitdiff
path: root/Misc/NEWS.d/next/Core and Builtins/2018-11-30-17-50-28.bpo-35368.DNaDao.rst
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-12-03 12:29:29 +0100
committerGitHub <noreply@github.com>2018-12-03 12:29:29 +0100
commitc275be54411d425c90e7c679ddb5321ba458f61d (patch)
treecb6180265d9b933064d9565c69b1f71659f80d1f /Misc/NEWS.d/next/Core and Builtins/2018-11-30-17-50-28.bpo-35368.DNaDao.rst
parentdfd4a1d8414ea54a3c56e909167983a503e51067 (diff)
downloadcpython-git-c275be54411d425c90e7c679ddb5321ba458f61d.tar.gz
bpo-35368: Make PyMem_Malloc() thread-safe in debug mode (GH-10828)
When Python is compiled in debug mode, PyMem_Malloc() uses debug hooks, but it also uses pymalloc allocator instead of malloc(). Problem: pymalloc is not thread-safe, whereas PyMem_Malloc() is thread-safe in release mode (it's a thin wrapper to malloc() in this case). Modify the debug hook to use malloc() for PyMem_Malloc().
Diffstat (limited to 'Misc/NEWS.d/next/Core and Builtins/2018-11-30-17-50-28.bpo-35368.DNaDao.rst')
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2018-11-30-17-50-28.bpo-35368.DNaDao.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-11-30-17-50-28.bpo-35368.DNaDao.rst b/Misc/NEWS.d/next/Core and Builtins/2018-11-30-17-50-28.bpo-35368.DNaDao.rst
new file mode 100644
index 0000000000..4bcf608fdd
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2018-11-30-17-50-28.bpo-35368.DNaDao.rst
@@ -0,0 +1 @@
+:c:func:`PyMem_Malloc` is now also thread-safe in debug mode.