[2.7] bpo-35368: Make PyMem_Malloc() thread-safe in debug mode by vstinner · Pull Request #10828 · python/cpython
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().
vstinner
changed the title
[2.7] bpo-33015: Make PyMem_Malloc() thread-safe in debug mode
[2.7] bpo-35368: Make PyMem_Malloc() thread-safe in debug mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters