]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-137185: Fix `_Py_DumpStack()` async signal safety (gh-137187) (gh-137206)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 7 Oct 2025 18:11:46 +0000 (20:11 +0200)
committerGitHub <noreply@github.com>
Tue, 7 Oct 2025 18:11:46 +0000 (18:11 +0000)
commit75de39ba1b61636e4a49a457de23de78e7f0a5a1
tree4457fcf9f494cd448ff999d8c2833f7943beae2d
parent93ac6f3472d4cdf5dc8e0023f276f25c7a509f31
[3.14] gh-137185: Fix `_Py_DumpStack()` async signal safety (gh-137187) (gh-137206)

Call backtrace() once when installing the signal handler to ensure that
libgcc is dynamically loaded outside the signal handler.

This fixes a "signal-unsafe call inside of a signal" TSan error from
test_faulthandler.test_enable_fd.
(cherry picked from commit 11a8652e25341e696b06d8dc7a18e8c3ee8059e4)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Include/internal/pycore_traceback.h
Misc/NEWS.d/next/Library/2025-07-28-20-48-32.gh-issue-137185.fgI7-B.rst [new file with mode: 0644]
Modules/faulthandler.c
Python/traceback.c