Skip to content

Commit

Permalink
exceptor: Add SA_ONSTACK flag the POSIX backend (#802)
Browse files Browse the repository at this point in the history
Add the SA_ONSTACK flag to handle situations where an alternative
signal stack has been configured using sigaltstack(). In the situations
where no alternative stack was configured, this behaves as if the flag
has not been set.
  • Loading branch information
asabil authored May 30, 2024
1 parent ea5338c commit 078608f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gum/backend-posix/gumexceptor-posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@ gum_exceptor_backend_attach (GumExceptorBackend * self)
action.sa_sigaction = gum_exceptor_backend_on_signal;
sigemptyset (&action.sa_mask);
action.sa_flags = SA_SIGINFO | SA_NODEFER;
#ifdef SA_ONSTACK
action.sa_flags |= SA_ONSTACK;
#endif
for (i = 0; i != G_N_ELEMENTS (handled_signals); i++)
{
gint sig = handled_signals[i];
Expand Down

0 comments on commit 078608f

Please sign in to comment.