This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cberger
Recipients cberger
Date 2016-01-13.19:47:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452714471.66.0.669763876009.issue26102@psf.upfronthosting.co.za>
In-reply-to
Content
I've been messing with PyGILState_... handling for my embedded python interpreter and came across this issue:

code in PyGILState_Release:

    PyThreadState *tcur = (PyThreadState *)PyThread_get_key_value(
                                                            autoTLSkey);
    if (tcur == NULL)
        Py_FatalError("auto-releasing thread-state, "
                      "but no thread-state for this thread");

The Py_FatalError() call will then invoke PyErr_Fetch() which won't check if PyThreadState_GET() returns a valid ptr (!= NULL):

PyErr_Fetch(PyObject **p_type, PyObject **p_value, PyObject **p_traceback)
{
    PyThreadState *tstate = PyThreadState_GET();
    *p_type = tstate->curexc_type;
History
Date User Action Args
2016-01-13 19:47:51cbergersetrecipients: + cberger
2016-01-13 19:47:51cbergersetmessageid: <1452714471.66.0.669763876009.issue26102@psf.upfronthosting.co.za>
2016-01-13 19:47:51cbergerlinkissue26102 messages
2016-01-13 19:47:51cbergercreate