This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix nptl/tst-setuid3.c
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: Florian Weimer <fweimer at redhat dot com>, "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>
- Date: Tue, 19 Jan 2016 18:20:48 -0200
- Subject: Re: [PATCH] Fix nptl/tst-setuid3.c
- Authentication-results: sourceware.org; auth=none
- References: <569E97E2 dot 1000307 at linux dot vnet dot ibm dot com> <569E99CF dot 3020504 at redhat dot com>
On 19-01-2016 18:17, Florian Weimer wrote:
> On 01/19/2016 09:09 PM, Paul E. Murphy wrote:
>> pthread_barrier_wait can return either PTHREAD_BARRIER_SERIAL_THREAD
>> or 0. Posix makes no guarantees about which thread return the unique
>> value.
>>
>> Additionally, pthread_join was not called despite seemingly checking
>> for the error.
>>
>> 2016-01-19 Paul E. Murphy <murphyp@linux.vnet.ibm.com>
>>
>> * nptl/tst-setuid3.c (INVALID_BARRIER_WAIT): New macro.
>> (do_test): Use macro to simplify checking barrier exit
>> code, and actually join the child thread.
>
> Thanks for fixing this.
>
>> +/* True if pthread_barrier_wait returns without an error. */
>> +#define INVALID_BARRIER_WAIT(x) ((x != 0) && \
>> + (x != PTHREAD_BARRIER_SERIAL_THREAD))
>
> Please use an inline function or put parentheses around the x.
>
> Technically, this change is okay, but Adhemerval needs to decide if it
> can go in during the freeze.
>
> Florian
>
LGTM, thanks.