008-avr32_fix_sa_onstack.patch 1.1 KB

1234567891011121314151617181920212223242526
  1. From 974a769cc135bcfb1ea751db34a84ed6b5ceb509 Mon Sep 17 00:00:00 2001
  2. From: Haavard Skinnemoen <[email protected]>
  3. Date: Fri, 7 Dec 2007 14:02:19 +0100
  4. Subject: [PATCH] AVR32: Fix sa_restorer when SA_ONSTACK is set
  5. I don't remember exactly why we decided to pick the caller's value of
  6. sa_restorer when SA_ONSTACK is set, but it seems to break LTP's
  7. sigaltstack testcase. Some users have reported problems with
  8. sigaltstack as well; hopefully this will fix it.
  9. Signed-off-by: Haavard Skinnemoen <[email protected]>
  10. ---
  11. libc/sysdeps/linux/avr32/sigaction.c | 2 +-
  12. 1 files changed, 1 insertions(+), 1 deletions(-)
  13. --- a/libc/sysdeps/linux/avr32/sigaction.c
  14. +++ b/libc/sysdeps/linux/avr32/sigaction.c
  15. @@ -30,7 +30,7 @@ int __libc_sigaction(int signum, const s
  16. kact.k_sa_handler = act->sa_handler;
  17. memcpy(&kact.sa_mask, &act->sa_mask, sizeof (kact.sa_mask));
  18. kact.sa_flags = act->sa_flags;
  19. - if (kact.sa_flags & (SA_RESTORER | SA_ONSTACK))
  20. + if (kact.sa_flags & SA_RESTORER)
  21. kact.sa_restorer = act->sa_restorer;
  22. else
  23. kact.sa_restorer = __default_rt_sa_restorer;