Change type of dwarf_lock to mutex in order to take advantage of
built-in support for recursive locking.
* lib/locks.h: Add macros for locking, unlocking, initializing
and destroying mutexes.
* libdw/dwarf_begin_elf.c (dwarf_end): Replace rwlock macro with
mutex mac
* libdw/dwarf_getsrclines.c (read_srcfiles): Initialize Dwarf
member.
* libdw/dwarf_filesrc.c (dwarf_filesrc): Use dwarf_lock.
* libdw/libdwP.h (struct Dwarf_Files_s): Add Dwarf member.
Signed-off-by: Aaron Merey
---
v2 changes: Combined v1 patches 03/15 and 06/15
Report of the static analyzer:
Pointer, returned from function 'elf_getarhdr' at objdump.c:314,
may be NULL and is dereferenced at objdump.c:317. (CWE-476, CWE-690)
Corrections explained:
When processing archive elements, the code could dereference a NULL
pointer if 'elf_getarhdr' returns NULL. Th
* libdw/dwarf_offdie.c (__libdw_offdie): Use dwarf_lock.
Signed-off-by: Aaron Merey
---
v2 changes: Lock only for the duration of __libdw_findcu.
libdw/dwarf_offdie.c | 4
1 file changed, 4 insertions(+)
diff --git a/libdw/dwarf_offdie.c b/libdw/dwarf_offdie.c
index 883720de..a972
* tests/.gitignore: Add eu_search-lines.
* tests/Makefile.am: Add eu_search_lines,
run-eu-search-lines.sh.
* tests/eu_search_lines.c: New file.
tests/run-eu-search-lines.sh: New file.
Signed-off-by: Heather S. McIntyre
Signed-off-by: Aaron Merey
Signed-off
* tests/.gitignore: Add eu_search_macros.sh
* tests/Makefile.am: Add eu_search_macros,
run-eu-search-macros.sh.
* tests/eu_search_macros.c: New file.
* tests/run-eu-search-macros.sh: New file.
Signed-off-by: Heather S. McIntyre
Signed-off-by: Aaron Merey
S
* tests/.gitignore: Add eu_search_die.
* tests/Makefile.am: Add eu_search_die, run-eu-search-die.sh.
* tests/eu_search_die.c: New file.
* tests/run-eu-search-die.sh: New file.
Signed-off-by: Heather S. McIntyre
Signed-off-by: Aaron Merey
Signed-off-by: Mark Wielaa
From: Heather McIntyre
* tests/.gitignore: Add eu_search_cfi.
* tests/Makefile.am: Add eu_search_cfi, run-eu-search-cfi.sh.
* tests/eu_search_cfi.c: New file.
* tests/run-eu-search-cfi.sh: New file.
Signed-off-by: Heather S. McIntyre
Signed-off-by: Aaron Merey
S
* libdw/dwarf_getsrcfiles.c (dwarf_getsrcfiles): Use dwarf_lock.
* libdw/dwarf_getsrclines.c (dwarf_getsrclines): Use dwarf_lock.
Signed-off-by: Aaron Merey
---
v2 changes: Combined from v1 patches 04/15 and 05/15.
libdw/dwarf_getsrcfiles.c | 11 +++
libdw/dwarf_getsrcli
Hi Mark,
On Mon, Feb 3, 2025 at 7:40 AM Mark Wielaard wrote:
>
> Found the issue with the patches not showing up on the list.
> They were sent to elfutils-patches@ which doesn't exists...
> Add elfutils-devel to the CC now.
Apologies, I mixed up elfutils-devel@ and gdb-patches@.
I've reposted th
Hi Mark,
On Mon, Feb 3, 2025 at 8:36 AM Mark Wielaard wrote:
>
> I think this subtly changes what is being tested here. If I remember
> correctly this tests that gelf_getshdr works correctly even when the
> underlying fd is closed and the file is either mmapped or elf_cntl
> with ELF_C_FDREAD is
Like --enable-valgrind but uses helgrind instead of memcheck.
If both --enable-valgrind and --enable-helgrind are given then
helgrind takes priority.
--enable-helgrind requires --enable-valgrind-annotations.
* configure.ac: Add --enable-helgrind option.
* tests/Makefile.am: If US
thread-safety-subr.sh contains subroutine check_thread_safety_enabled
which skips further testing when USE_LOCKS is false.
* tests/Makefile.am (EXTRA_DIST): Add thread-safety-subr.sh.
* tests/thread-safety-subr.sh: New file.
Signed-off-by: Aaron Merey
---
v2 changes: Removed chec
13 matches
Mail list logo