Skip to content
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

Set SA_ONSTACK in zend_sigaction #9597

Merged
merged 2 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ PHP NEWS
- Core:
. Fixed bug GH-9388 (Improve unset property and __get type incompatibility
error message). (ilutov)
. SA_ONSTACK is now set for signal handlers to be friendlier to other
in-process code such as Go's cgo. (Kévin Dunglas)

- Opcache:
. Added start, restart and force restart time to opcache's
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ ZEND_API void zend_sigaction(int signo, const struct sigaction *act, struct siga
if (SIGG(handlers)[signo-1].handler == (void *) SIG_IGN) {
sa.sa_sigaction = (void *) SIG_IGN;
} else {
sa.sa_flags = SA_SIGINFO | (act->sa_flags & SA_FLAGS_MASK);
sa.sa_flags = SA_ONSTACK | SA_SIGINFO | (act->sa_flags & SA_FLAGS_MASK);
sa.sa_sigaction = zend_signal_handler_defer;
sa.sa_mask = global_sigmask;
}
Expand Down