summaryrefslogtreecommitdiff
path: root/syscall.c
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2013-07-18 09:41:20 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2013-07-18 09:41:20 +0200
commit94e10354d888d1f09bc803616869802a13a576bf (patch)
tree2458c3c8c145a4e45f5dd3e6b0016cd9faf99ddd /syscall.c
parent670b21b710120f4e6f3cae73727060c6fd52994c (diff)
downloadstrace-94e10354d888d1f09bc803616869802a13a576bf.tar.gz
strace-94e10354d888d1f09bc803616869802a13a576bf.tar.bz2
strace-94e10354d888d1f09bc803616869802a13a576bf.tar.xz
ARM: remove wrong NSIG = 32 define
ARM in fact has 64 signals (1..64), and NSIG should be 65 (as usual, rememebr that NSIG_libc == NSIG_kernel+1). I carefully reviewed all usages of NSIG. In syscall.c, the only usage is: for (i = 0; i <= NSIG; i++) if (strcasecmp(s, signame(i) + 3) == 0)... which is safe even if NSIG is way too big - signame(i) returns a well-formed string for any i. In signal.c, memcpy(&sigset, &sc.sc_mask, NSIG / 8) is used by IA64 and TILE code, so ARM change can't affect it. And final usage is: struct new_sigaction::unsigned long sa_mask[NSIG / sizeof(long)]; It will grow on ARM (and become correct in the process). Its only use is memcpy(&sigset, &sa.sa_mask, NSIG / 8); printsigmask(&sigset, 1); which used to copy garbage in high bits, now it will copy actual data. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'syscall.c')
-rw-r--r--syscall.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/syscall.c b/syscall.c
index a27fee9..02c0867 100644
--- a/syscall.c
+++ b/syscall.c
@@ -84,11 +84,6 @@
# warning: NSIG is not defined, using 32
# define NSIG 32
#endif
-#ifdef ARM
-/* Ugh. Is this really correct? ARM has no RT signals?! */
-# undef NSIG
-# define NSIG 32
-#endif
#include "syscall.h"