mirror of
https://github.com/python/cpython.git
synced 2026-06-27 05:16:16 -04:00
[3.15] gh-151278: Fix test_faulthandler on UBSan (GH-151279) (#151281)
gh-151278: Fix test_faulthandler on UBSan (GH-151279)
* Py_FatalError() no longer calls _PyFaulthandler_Fini() if it
doesn't hold the GIL.
* Skip test_faulthandler tests raising signals if run with UBSan.
* Enable test_faulthandler in GitHub Action "Reusable Sanitizer".
(cherry picked from commit e60c42dc3f)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
committed by
GitHub
parent
10f616cf39
commit
e8d914fd49
@@ -3724,7 +3724,9 @@ fatal_error(int fd, int header, const char *prefix, const char *msg,
|
||||
This function already did its best to display a traceback.
|
||||
Disable faulthandler to prevent writing a second traceback
|
||||
on abort(). */
|
||||
_PyFaulthandler_Fini();
|
||||
if (has_tstate_and_gil) {
|
||||
_PyFaulthandler_Fini();
|
||||
}
|
||||
|
||||
/* Check if the current Python thread hold the GIL */
|
||||
if (has_tstate_and_gil) {
|
||||
|
||||
Reference in New Issue
Block a user