[issue1758146] Crash in PyObject_Malloc
report at bugs.python.org
Mon Jul 21 17:39:24 CEST 2008
Franco DiRosa <fdirosa at stny.rr.com> added the comment:
"Also, that Py_DEBUG check effectively says that if you use simplified
GIL API for a particular thread against the first interpreter, you are
prohibited from creating additional thread states for that thread."
I found that you cannot create additional thread states against the
first interpreter and swap between them w/o this assertion occurring.
I didn't use the GIL functions at all and had this issue in debug.
PyInitialize initializes the GIL and hijacks the main interpreter. We
always call PyInitialize so does that mean we can only use the GIL
functions with the main interpreter and nothing else when
locking/unlocking the global lock as you seem to infer? Does that mean
there is a backward compatibility issue here with those who used the
main interpreter only and created thread states from it to handle multi-
threading, like I did (thru the use of PyEval_Acquire/Release &
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list