OSDN Git Service

Add argument checking to sigemptyset(3) and friends.
authorElliott Hughes <enh@google.com>
Sat, 1 Dec 2012 00:40:55 +0000 (16:40 -0800)
committerElliott Hughes <enh@google.com>
Sat, 1 Dec 2012 00:40:55 +0000 (16:40 -0800)
commitda73f655fcbac6e1a8bfd35303cef6f41187d12b
tree7c85d8bc7ff5cb4a8eebd0ea3a6a808790c26f5d
parent16c61f088524756ef0fa1b030719f6745eaef2db
Add argument checking to sigemptyset(3) and friends.

You could argue that this is hurting people smart enough to have manually
allocated a large-enough sigset_t, but those people are smart enough to
implement their own sigset functions too.

I wonder whether our least unpleasant way out of our self-inflicted 32-bit
cesspool is to have equivalents of _FILE_OFFSET_BITS such as _SIGSET_T_BITS,
so calling code could opt in? You'd have to be careful passing sigset_t
arguments between code compiled with different options.

Bug: 5828899
Change-Id: I0ae60ee8544835b069a2b20568f38ec142e0737b
libc/include/signal.h
tests/Android.mk
tests/signal_test.cpp [new file with mode: 0644]