This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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 v3][BZ 13690] Do not violate mutex destruction requirements.


On Mon, 2015-08-24 at 09:43 +0200, Torvald Riegel wrote:
> On Mon, 2015-08-24 at 09:32 +0200, Andreas Schwab wrote:
> > Torvald Riegel <triegel@redhat.com> writes:
> > 
> > > diff --git a/sysdeps/unix/sysv/linux/lowlevellock-futex.h b/sysdeps/unix/sysv/linux/lowlevellock-futex.h
> > > index 59f6627..e1a9c58 100644
> > > --- a/sysdeps/unix/sysv/linux/lowlevellock-futex.h
> > > +++ b/sysdeps/unix/sysv/linux/lowlevellock-futex.h
> > > @@ -54,8 +54,13 @@
> > >  #if IS_IN (libc) || IS_IN (rtld)
> > >  /* In libc.so or ld.so all futexes are private.  */
> > >  # ifdef __ASSUME_PRIVATE_FUTEX
> > > -#  define __lll_private_flag(fl, private) \
> > > -  ((fl) | FUTEX_PRIVATE_FLAG)
> > > +#  define __lll_private_flag(fl, private)			\
> > > +  ({								\
> > > +    /* Prevent warnings in callers of this macro.  */		\
> > > +    int __lll_private_flag_priv __attribute__ ((unused));	\
> > > +    __lll_private_flag_priv = private;				\
> > 
> > Macro parameters should be parenthesized.
> 
> You're right, obviously.  Update attached.
> 
> On the positive side, this patch is small enough that I should
> eventually run out of opportunities for stupid mistakes like this one ;)

I have committed this now, given that I addressed Andreas' feedback,
lack of more recent reviews, and that we really want this fixed.


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