mirror of
https://github.com/python/cpython.git
synced 2025-07-14 06:45:17 +00:00
parent
ddc7440b0e
commit
0bd5fb0112
1 changed files with 4 additions and 0 deletions
|
@ -2642,8 +2642,12 @@ _Py_PrintFatalError(int fd)
|
|||
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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue