This is the mail archive of the
mailing list for the glibc project.
Belated ping2, Re: [RFC][patch] Fix racy nptl/tst-getpid2
- From: Brooks Moses <bmoses at google dot com>
- To: libc-alpha at sourceware dot org
- Cc: Paul Pluzhnikov <ppluzhnikov at google dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Wed, 20 Nov 2013 18:39:02 -0800
- Subject: Belated ping2, Re: [RFC][patch] Fix racy nptl/tst-getpid2
- Authentication-results: sourceware.org; auth=none
- References: <20121001183214 dot B03561908A5 at elbrus2 dot mtv dot corp dot google dot com> <CAMe9rOpTjYCn_mjpG=eavdeu94K1zE3m7keDyFmsc6Wf6PX0WQ at mail dot gmail dot com> <CALoOobNPYsei9J-kqg97zgGmYmY5nTnW-U7CoLp5UyzzHwhQdg at mail dot gmail dot com> <CALoOobNKe-=yyh0YnEKtn2+DHrXpkgG4PVrJdg3iAiouK+XPEQ at mail dot gmail dot com>
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
If there's consensus with H.J.'s assertion that it's invalid, I'll gladly
write the obvious patch to remove it.
On 10/26/2012 11:43 AM, Paul Pluzhnikov wrote:
On Mon, Oct 1, 2012 at 12:34 PM, Paul Pluzhnikov <firstname.lastname@example.org> wrote:
On Mon, Oct 1, 2012 at 11:59 AM, H.J. Lu <email@example.com> wrote:
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.
Corrected ChangeLog below.
2012-10-01 Paul Pluzhnikov <firstname.lastname@example.org>
* 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
@@ -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