This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix invalid sigprocmask call


On Mär 24 2017, Pedro Alves <palves@redhat.com> wrote:

> On 03/24/2017 03:01 AM, Yousong Zhou wrote:
>> The POSIX document says
>> 
>>     The pthread_sigmask() and sigprocmask() functions shall fail if:
>> 
>>     [EINVAL]
>>     The value of the how argument is not equal to one of the defined values.
>> 
>> and this is how musl-libc is currently doing.  Fix the call to be safe
>> and correct
>> 
>>  [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_sigmask.html
>> 
>
> I don't agree.  It's a musl bug.  Please fix it / file a musl bug.
>
> Note that that document also says (emphasis mine):
>
>   If the argument set is not a null pointer, it points to a set of signals to
>   be used to CHANGE the currently blocked set.
>
>   The argument how indicates the way in which the set is CHANGED, and the
>   application shall ensure it consists of one of the following values:

Later on it says:

    If set is a null pointer, the value of the argument how is not
    significant ...

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]