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>
This commit is contained in:
parent
670b21b710
commit
94e10354d8
5
signal.c
5
signal.c
@ -89,11 +89,6 @@ struct sigcontext {
|
||||
# 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
|
||||
|
||||
#ifdef HAVE_SIGACTION
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user