about summary refs log tree commit diff
path: root/elf/tst-tls20.c
Commit message (Collapse)AuthorAgeFilesLines
* elf: Fix a wrong array access on tst-tls20Adhemerval Zanella2021-07-161-4/+4
| | | | Check on x86_64-linux-gnu with --enable-stack-protector=all.
* elf: Fix DTV gap reuse logic (BZ #27135)Adhemerval Zanella2021-07-141-7/+268
| | | | | | | | | | | | | | | | | | | | | | | | | | This is updated version of the 572bd547d57a (reverted by 40ebfd016ad2) that fixes the _dl_next_tls_modid issues. This issue with 572bd547d57a patch is the DTV entry will be only update on dl_open_worker() with the update_tls_slotinfo() call after all dependencies are being processed by _dl_map_object_deps(). However _dl_map_object_deps() itself might call _dl_next_tls_modid(), and since the _dl_tls_dtv_slotinfo_list::map is not yet set the entry will be wrongly reused. This patch fixes by renaming the _dl_next_tls_modid() function to _dl_assign_tls_modid() and by passing the link_map so it can set the slotinfo value so a subsequente _dl_next_tls_modid() call will see the entry as allocated. The intermediary value is cleared up on remove_slotinfo() for the case a library fails to load with RTLD_NOW. This patch fixes BZ #27135. Checked on x86_64-linux-gnu. Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
* elf: Fix missing include in test case [BZ #27136]Szabolcs Nagy2021-04-151-0/+1
| | | | | | | Broken test was introduced in commit 8f85075a2e9c26ff7486d4bbaf358999807d215c elf: Add a DTV setup test [BZ #27136]
* elf: Add a DTV setup test [BZ #27136]Szabolcs Nagy2021-04-151-0/+98
The test dlopens a large number of modules with TLS, they are reused from an existing test. The test relies on the reuse of slotinfo entries after dlclose, without bug 27135 fixed this needs a failing dlopen. With a slotinfo list that has non-monotone increasing generation counters, bug 27136 can trigger. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>