]> granicus.if.org Git - strace/commit
signal: fix decoding of struct old_sigaction on some architectures
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 28 May 2017 17:13:29 +0000 (17:13 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 28 May 2017 17:13:29 +0000 (17:13 +0000)
commit337d3a10ce29d778df75b3def3aa1ac6ccc4da2c
tree5f6090610ab4be7f7d57e6f62f9d733173e0a8b4
parenta560ac718e8fe368ae362d4f9fe98db37f4eada4
signal: fix decoding of struct old_sigaction on some architectures

On alpha, struct old_sigaction.sa_flags has a 32-bit type.

On mips, only first word of old_sigaction.sa_mask is read.

On all architectures except alpha and mips that have old sigaction
syscall, struct old_sigaction has sa_restorer field that has to be
decoded.

* signal.c (struct old_sigaction) [ALPHA]: Change sa_flags type
to unsigned int, add ATTRIBUTE_PACKED.
[MIPS]: Dhrink sa_mask array to 1 element.
[!ALPHA && !MIPS]: Define sa_restorer field unconditionally.
(struct old_sigaction32): Likewise.
(decode_old_sigaction) [!current_wordsize]: Initialize sa_restorer field
from old_sigaction32.sa_restorer unconditionally.
[!ALPHA && !MIPS]: Print old_sigaction.sa_restorer if SA_RESTORER flag
is set.
* NEWS: Mention this change.
NEWS
signal.c