Belated ping2, Re: [RFC][patch] Fix racy nptl/tst-getpid2

Brooks Moses bmoses@google.com
Thu Nov 21 22:08:00 GMT 2013


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


On 10/26/2012 11:43 AM, Paul Pluzhnikov wrote:
> Ping?
>
> On Mon, Oct 1, 2012 at 12:34 PM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
>> On Mon, Oct 1, 2012 at 11:59 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>
>>> http://sourceware.org/bugzilla/show_bug.cgi?id=11214
>>
>> Oh, yes; I've seen that one.
>>
>>> I believe the test is invalid.
>>
>> I don't necessarily agree: it is true that application using direct
>> clone(..., CLONE_VM) and using dynamic loader is not supported.
>>
>> But here we are testing glibc itself, and we get to bend the rules.
>
> The patch:
> http://sourceware.org/ml/libc-alpha/2012-10/msg00021.html
>
> Corrected ChangeLog below.
>
> Thanks,
> --
> Paul Pluzhnikov
>
> nptl/ChangeLog:
>
> 2012-10-01  Paul Pluzhnikov  <ppluzhnikov@google.com>
>
> 	[BZ #11214]
> 	* Makefile (tst-getpid2-ENV): New variable.

And, for sake of simplicity, I'll recopy the patch here, though the actual 
context around it is a tad bitrotten by now:


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



More information about the Libc-alpha mailing list