diff -r b3d0bf112f70 Python/pythonrun.c --- a/Python/pythonrun.c Sun Jul 26 09:01:22 2015 +0300 +++ b/Python/pythonrun.c Sun Jul 26 16:46:55 2015 +0200 @@ -2642,8 +2642,12 @@ return; display_stack: +#ifdef WITH_THREAD /* PyGILState_GetThisThreadState() works even if the GIL was released */ tstate = PyGILState_GetThisThreadState(); +#else + tstate = PyThreadState_GET(); +#endif if (tstate == NULL) { /* _Py_DumpTracebackThreads() requires the thread state to display * frames */