forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpo-43390: Set SA_ONSTACK in PyOS_setsig (pythonGH-24730)
This is friendlier to other in-process code that an extension module or embedding use could pull in such as CGo where tiny stacks are the norm and sigaltstack() has been used to provide for signal handlers. Without this, signals received by a process using tiny stacks may lead to stack overflow crashes.
- Loading branch information
Showing
2 changed files
with
10 additions
and
1 deletion.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
Misc/NEWS.d/next/Core and Builtins/2021-03-03-17-58-49.bpo-43390.epPpwV.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CPython now sets the ``SA_ONSTACK`` flag in ``PyOS_setsig`` for the VM's | ||
default signal handlers. This is friendlier to other in-process code that | ||
an extension module or embedding use could pull in (such as Golang's cgo) | ||
where tiny thread stacks are the norm and ``sigaltstack()`` has been used to | ||
provide for signal handlers. This is a no-op change for the vast majority | ||
of processes that don't use sigaltstack. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters