mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
faulthandler: dump all threads by default
* Set the default value of all_threads arguments to True * Py_FatalError() dumps all threads, instead of only the current thread Dump only the current thread is not reliable. In some cases, Python is unable to retrieve the state of the current thread and so is unable to dump the traceback. faulthandler keeps a reference to the interpreter and so is always able to dump the traceback of all threads.
This commit is contained in:
parent
c925617b54
commit
7bba62fd68
4 changed files with 24 additions and 23 deletions
|
@ -2144,7 +2144,7 @@ Py_FatalError(const char *msg)
|
|||
if (tstate != NULL) {
|
||||
fputc('\n', stderr);
|
||||
fflush(stderr);
|
||||
_Py_DumpTraceback(fd, tstate);
|
||||
_Py_DumpTracebackThreads(fd, tstate->interp, tstate);
|
||||
}
|
||||
_PyFaulthandler_Fini();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue