Hi Heather, On Tue, 2023-08-08 at 12:07 -0500, Heather McIntyre via Elfutils-devel wrote: > This patch was created to address thread-safety issues reported in bug 26921 > <https://sourceware.org/bugzilla/show_bug.cgi?id=26921> and bug 26930 > <https://sourceware.org/bugzilla/show_bug.cgi?id=26930>. > Additionally, other thread-safety fixes were applied during the process. > > Brief Description: > Locking was implemented for tsearch and tfind. > Changes to multiple files within the libelf library were made such that > USE_LOCKS no longer causes tests to fail when enabled. > New tests were added to confirm thread-safety.
Very nice. That is a lot of work. And I must admit that I cannot hold that much work in my little head at the same time. So I have split up your commit into (what I hope are) logical independent parts. That will make it easier to review. I might have split it into too many parts, but that at least makes it easier to just add those parts that are trivially correct. The only changes I made were: 1. Move the ChangeLog entries into the commit message (This is something we do now and makes cherry picking small changes easier, but I see it isn't actually documented in CONTRIBUTING, sorry. I'll try to update that.) 2. Fixed up some Copyright notices as discussed off-list. 3. Made some whitespace/indentation changes which made the diffs slightly smaller (in most cases). I'll comment/review the individual commits. Which I'll post to the list. Heather McIntyre (16): lib: Add new once_define and once macros to eu-config.h libelf: Make elf_version thread-safe libelf: Fix deadlock in __libelf_readall libelf: Fix deadlock in elf_cntl libelf: Fix elf_end deadlock libelf: Make elf32_getchdr and elf64_getchdr thread-safe lib: Add eu_tsearch and eu_tfind libcpu: Change calls for tsearch/tfind to eu_tsearch/eu_tfind. src: Use eu-search in nm and findtextrel. libdw: make dwarf_getalt thread-safe libdw: Add locking around __libdw_dieabbrev for dwarf_hasattr libdw: Make libdw_find_split_unit thread-safe libdw: Make libdw_findcu thread-safe libdw,libdwfl: Use eu-search for thread-safety tests: Add eu-search tests configure: No longer mark --enable-thread-safety as EXPERIMENTAL Which can also be found here: https://code.wildebeest.org/git/user/mjw/elfutils/log/?h=thread-safety Cheers, Mark