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: Belated ping2, Re: [RFC][patch] Fix racy nptl/tst-getpid2


On Wed, Nov 20, 2013 at 06:39:02PM -0800, Brooks Moses wrote:
> Ping^2?
> 
> I know it's been a while, but I got bitten by this one again just
> now.  It would be nice to either fix the test or get it removed on
> grounds of being invalid.
> 
> If there's consensus with H.J.'s assertion that it's invalid, I'll
> gladly write the obvious patch to remove it.
> 
> Thanks,
> - Brooks
> 

I agree with Paul and think the patch is OK.  My understanding from
reading the code is that the test verifies clone functionality with
CLONE_THREAD is not set and CLONE_VM is set and ensures that the PID
is set (and reset) appropriately in userspace.

Thanks,
Siddhesh

> 
> diff --git a/nptl/Makefile b/nptl/Makefile
> index b081b07..6f64b2c 100644
> --- a/nptl/Makefile
> +++ b/nptl/Makefile
> @@ -270,6 +270,9 @@ tests-nolibpthread = tst-unload
>  # of the page size since every architecture's page size is > 1k.
>  tst-oddstacklimit-ENV = ; ulimit -s 1023;
> 
> +# Avoid TLS race in dynamic loader
> +tst-getpid2-ENV = LD_BIND_NOW=1
> +
>  gen-as-const-headers = pthread-errnos.sym
> 
>  LDFLAGS-pthread.so = -Wl,--enable-new-dtags,-z,nodelete,-z,initfirst
> 


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