STINNER Victor <vstin...@redhat.com> added the comment:

> why was that only an issue on 2.7?

I added PyMem_RawMalloc() to Python 3.4 and this function must be thread-safe.

https://docs.python.org/dev/c-api/memory.html#raw-memory-interface
"These functions are thread-safe, the GIL does not need to be held."

I replaced PyMem_RawMalloc() with PyMem_Malloc() when I backported the change, 
but I didn't know that PyMem_Malloc() isn't thread-safe *in debug mode*!

Gregory: do you think that it would be be crazy to fix PyMem_Malloc() to make 
it thread-safe in debug mode as well? I implemented a fix: PR 10828.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33015>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to