[Bug libdw/31447] Provide a public debug section relocation function

2024-08-02 Thread dichen at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31447 --- Comment #4 from Di Chen --- @mjw I have function dwelf_relocation_debug_sections() added in libdwelf.a. ``` $ pwd /home/dichen/elfutils $ eu-readelf -s libdwelf/libdwelf.a | grep dwelf_relocation_debug_sections libdwelf/libdwelf.a(dwelf_

[Bug libdw/31447] Provide a public debug section relocation function

2024-08-02 Thread amerey at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31447 Aaron Merey changed: What|Removed |Added CC||amerey at redhat dot com --- Comment #5

[PATCH 01/10 v3] libelf: Fix deadlock in __libelf_readall

2024-08-02 Thread Aaron Merey
From: Heather McIntyre Apply locking during __libelf_readall. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- v3 changes: Update comments and change order or child lock aquisition. libelf/common.h | 24 ++-- libelf/el

[PATCH 02/10 v3] libelf: Fix deadlock in elf_cntl

2024-08-02 Thread Aaron Merey
From: Heather McIntyre * libelf/elf_cntl.c (elf_cntl): Move rwlock_wrlock, rwlock_unlock, inside case switch statements. Remove unnecessary early return. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- v3 changes: Remove unneces

[PATCH 03/10 v3] lib: Add eu_tsearch, eu_tfind, eu_tdelete and eu_tdestroy

2024-08-02 Thread Aaron Merey
From: Heather McIntyre Add struct search_tree to hold tree root and lock. Add new eu_t* functions for ensuring synchronized tree access. Replace tsearch, tfind, etc with eu_t* equivalents. lib: * Makefile.am (libeu_a_SOURCES): Add eu-search.c. (noinst_HEADERS): Add eu-search.h

[PATCH 04/10 v3] libdw: Add rwlocks for Dwarf and Dwarf_CU

2024-08-02 Thread Aaron Merey
From: Heather McIntyre Add dwarf_lock for Dwarf as well as abbrev_lock for Dwarf_CU. * libdw/dwarf_begin_elf.c (dwarf_begin_elf): Init dwarf_lock. * libdw/dwarf_end.c (cu_free): Free abbrev_lock. (dwarf_end): Free dwarf_lock. * libdw/libdwP.h (struct Dwarf): Defin

[PATCH 05/10 v3] libdw: make dwarf_getalt and dwarf_setalt thread-safe

2024-08-02 Thread Aaron Merey
From: Heather McIntyre * libdw/dwarf_getalt.c (dwarf_getalt): Add locking. * libdw/dwarf_setalt.c (dwarf_setalt): Ditto. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- v3 changes: Check for NULL argument before acquiring lock.

[PATCH 06/10 v3] libdwP.h: Add locking to dwarf_formref_die and __libdw_dieabbrev

2024-08-02 Thread Aaron Merey
From: Heather McIntyre * libdw/dwarf_formref_die.c (dwarf_formref_die): Add locking around call to __libdw_intern_next_unit. * libdw/libdwP.h (__libdw_dieabbrev): Add locking. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard

[PATCH 07/10 v3] libdw: Make libdw_find_split_unit thread-safe

2024-08-02 Thread Aaron Merey
From: Heather McIntyre * libdw/libdwP.h (struct Dwarf_CU): Add split_lock. * libdw/libdw_find_split_unit.c (__libdw_find_split_unit): Add locking. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- v3 changes: Move Dwarf s

[PATCH 08/10 v3] libdw: Make libdw_findcu thread-safe

2024-08-02 Thread Aaron Merey
From: Heather McIntyre * libdw/libdw_findcu.c (__libdw_findcu): Add locking. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- v3 changes: Fix indentation and move rwlock_init calls to other patches in this series. libdw/libdw_findcu.c |

[PATCH 10/10 v3] configure: No longer mark --enable-thread-safety as EXPERIMENTAL

2024-08-02 Thread Aaron Merey
From: Heather McIntyre * configure.ac (--enable-thread-safety): Remove experimental warning. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- No changes between v2 and v3. PR31967 (datarace in elf_compress[_gnu]) was recently file

[PATCH 09/10 v3] tests: Add eu-search tests

2024-08-02 Thread Aaron Merey
From: Heather McIntyre * tests/eu_search_cfi.c: New file. * tests/eu_search_die.c: New file. * tests/eu_search_lines.c: New file. * tests/eu_search_macros.c: New file. * tests/run-eu-search-tests.sh: New test. * tests/Makefile.am: Add USE_LOCKS cond