[issue1758146] Crash in PyObject_Malloc

Graham Dumpleton report at bugs.python.org
Thu Jul 24 04:15:04 CEST 2008


Graham Dumpleton <Graham.Dumpleton at gmail.com> added the comment:

Franco, you said 'I found that you cannot create additional thread 
states against the  first interpreter and swap between them w/o this 
assertion occurring. ...'

Since the Py_DEBUG check is checking against the simplified GIL state 
API thread state object, then technically you could have a thread with 
multiple thread states, that thread just can't ever use/have used 
simplified GIL state API.

Take for example a system where threads are actually foreign threads and 
not created within Python. In this case simplified GIL state API thread 
state object would never have been created for that thread. For those 
you could have multiple thread states and not trip the test.

In other words, multiple thread states only blocked if one of them is 
the internal one created by simplified GIL state AP. This is getting 
hard to avoid though.

In summary, the simplified GIL state API is basically viral in nature.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1758146>
_______________________________________


More information about the Python-bugs-list mailing list