[PATCH] Test for lazy tls descriptor initialization
Szabolcs Nagy
szabolcs.nagy@arm.com
Tue Nov 17 16:51:00 GMT 2015
These tests can trigger BZ 19129, 18572, 18034 with varying reliability.
They test concurrent first access of tls objects with internal and external
linkage in a dso. The four variants are {static,extern} x 2 alignments.
(The tlsdesc race is more likely to trigger when the tls descriptors
are not double-word aligned in the .rel.plt section.)
I enabled the tests for tlsdesc because that's the only case when first
tls access does lazy initialization.
There might be a cleaner solution for the -mtls-dialect=... check.
Currently I'm looking at disabling lazy symbol binding of tlsdesc,
but it's not as trivial as i'd like it to be, in case such patch
is accepted then these tests are not useful.
ChangeLog:
2015-11-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
* config.make.in (have-tlsdesc, config-clfags-tlsdesc): New.
* configure.ac (libc_cv_tlsdesc, libc_cv_cc_tlsdesc): New.
* configure: Regenerated.
* elf/Makefile (tests): Add tst-lazytls{1,2,3,4}.
(modules-names): Add tst-lazytls{1,2,3,4}mod.
($(objpfx)tst-lazytls{1,2,3,4}): Add dependencies.
* elf/tst-lazytls.h: New.
* elf/tst-lazytls1.c: New.
* elf/tst-lazytls2.c: New.
* elf/tst-lazytls3.c: New.
* elf/tst-lazytls4.c: New.
* elf/tst-lazytls1mod.c: New.
* elf/tst-lazytls2mod.c: New.
* elf/tst-lazytls3mod.c: New.
* elf/tst-lazytls4mod.c: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tlsdesc-test.diff
Type: text/x-patch
Size: 8659 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20151117/fe34081f/attachment.bin>
More information about the Libc-alpha
mailing list