[issue31282] C APIs called without GIL in PyOS_Readline
STINNER Victor
report at bugs.python.org
Mon Aug 28 05:32:53 EDT 2017
STINNER Victor added the comment:
You must hold the GIL to call PyMem_Malloc(). A debug assert should be
raised if you don't hold the GIL since Python 3.6 with PYTHONMALLOC=debug.
Call PyMem_RawMalloc().
I fixed Python 3, no?
For Python 2, in practice you can call PyMem_Malloc() without holding the
GIL, it's just malloc() which is thread safe.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31282>
_______________________________________
More information about the Python-bugs-list
mailing list