uClibc-0.9.29-fix-sa_onstack.patch.avr32 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. From 974a769cc135bcfb1ea751db34a84ed6b5ceb509 Mon Sep 17 00:00:00 2001
  2. From: Haavard Skinnemoen <hskinnemoen@atmel.com>
  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 <hskinnemoen@atmel.com>
  10. ---
  11. libc/sysdeps/linux/avr32/sigaction.c | 2 +-
  12. 1 files changed, 1 insertions(+), 1 deletions(-)
  13. diff --git a/libc/sysdeps/linux/avr32/sigaction.c b/libc/sysdeps/linux/avr32/sigaction.c
  14. index a97ff3d..6dcca91 100644
  15. --- a/libc/sysdeps/linux/avr32/sigaction.c
  16. +++ b/libc/sysdeps/linux/avr32/sigaction.c
  17. @@ -30,7 +30,7 @@ int __libc_sigaction(int signum, const struct sigaction *act,
  18. kact.k_sa_handler = act->sa_handler;
  19. memcpy(&kact.sa_mask, &act->sa_mask, sizeof (kact.sa_mask));
  20. kact.sa_flags = act->sa_flags;
  21. - if (kact.sa_flags & (SA_RESTORER | SA_ONSTACK))
  22. + if (kact.sa_flags & SA_RESTORER)
  23. kact.sa_restorer = act->sa_restorer;
  24. else
  25. kact.sa_restorer = __default_rt_sa_restorer;
  26. --
  27. 1.5.3.4