8000 gh-128400: Only show the current thread in `Py_FatalError` on the free-threaded build by ZeroIntensity · Pull Request #128758 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-128400: Only show the current thread in Py_FatalError on the free-threaded build #128758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Don't print all threads in Py_FatalError
  • Loading branch information
ZeroIntensity committed Jan 12, 2025
commit 3201f793915a8ef1d3cc02918c2d0b48607345a5
11 changes: 11 additions & 0 deletions Python/pylifecycle.c
Original file line number Diff line number Diff line change
Expand Up @@ -3023,7 +3023,18 @@ _Py_FatalError_DumpTracebacks(int fd, PyInterpreterState *interp,
PUTS(fd, "\n");

/* display the current Python stack */
#ifndef Py_GIL_DISABLED
_Py_DumpTracebackThreads(fd, interp, tstate);
#else
if (tstate == NULL)
{
/* _Py_DumpTraceback() prints out a message when tstate is null,
* whereas _Py_DumpTracebackThreads() does not. Early-return for
* consistency. */
return;
}
_Py_DumpTraceback(fd, tstate);
#endif
}

/* Print the current exception (if an exception is set) with its traceback,
Expand Down
0