about summary refs log tree commit diff
path: root/sysdeps/mach/hurd/i386/trampoline.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/hurd/i386/trampoline.c')
-rw-r--r--sysdeps/mach/hurd/i386/trampoline.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sysdeps/mach/hurd/i386/trampoline.c b/sysdeps/mach/hurd/i386/trampoline.c
index 0c5d5a194c..68db596cca 100644
--- a/sysdeps/mach/hurd/i386/trampoline.c
+++ b/sysdeps/mach/hurd/i386/trampoline.c
@@ -37,6 +37,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
   void firewall (void);
   extern const void _hurd_intr_rpc_msg_cx_sp;
   extern const void _hurd_intr_rpc_msg_sp_restored;
+  const struct sigaction *action;
   void *volatile sigsp;
   struct sigcontext *scp;
   struct
@@ -93,7 +94,11 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
      the SP on sigreturn.  */
     state->basic.uesp = state->basic.ecx;
 
-  if ((ss->actions[signo].sa_flags & SA_ONSTACK)
+  /* XXX what if handler != action->handler (for instance, if a signal
+   * preemptor took over) ? */
+  action = & _hurd_sigstate_actions (ss) [signo];
+
+  if ((action->sa_flags & SA_ONSTACK)
       && !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK)))
     {
       sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size;