elf: Add test case for [BZ #19329]
Test concurrent dlopen and pthread_create when the loaded modules have TLS. This triggers dl-tls assertion failures more reliably than the nptl/tst-stack4 test. The dlopened module has 100 DT_NEEDED dependencies with TLS, they were reused from an existing TLS test. The number of created threads during dlopen depends on filesystem speed and hardware, but at most 3 threads are alive at a time to limit resource usage. --- v5: - moved from nptl/ to elf/ - use many tls modules from another test (affects the timing a bit as these need more relocation processing, but still detects the race) - use xdlopen - use stdatomic.h - moved from tests-internal back to tests - use acq/rel atomics instead of relaxed, this works too and cleaner. - moved after bug fix patch. v4: - rebased, updated copyright year. - moved to tests-internal because of <atomic.h> v3: - use the new test support code. - better Makefile usage so modules are cleaned properly. v2: - undef NDEBUG. - join nop threads so at most 3 threads exist at a time. - remove stack size setting (resource usage is no longer a concern). - stop creating threads after dlopen observably finished. - print the number of threads created for debugging.
Loading
Please register or sign in to comment