[PATCH] debuginfod-client.c: Avoid freeing uninitialized value

2025-01-24 Thread Aaron Merey
debuginfod_validate_imasig might call free on an uninitialized sig_buf due to a goto that can occur before sig_buf is set to NULL. Fix this by setting sig_buf to NULL before the goto. Signed-off-by: Aaron Merey --- debuginfod/debuginfod-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH] src/readelf.c: Close skel_fd

2025-01-24 Thread Aaron Merey
skel_fd is passed to create_dwfl, which calls dup() on skel_fd. create_dwfl handles closing the dup'ed fd but not the original. Ensure the original skel_fd is closed after it's passed to create_dwfl. Signed-off-by: Aaron Merey --- src/readelf.c | 8 +++- 1 file changed, 7 insertions(+), 1 d

Re: [PATCH 04/15] dwarf_getsrcfiles.c: Add locking

2025-01-24 Thread Mark Wielaard
Hi Aaron, On Thu, Jan 23, 2025 at 09:15:10PM -0500, Aaron Merey wrote: > > On Sun, Jan 19, 2025 at 10:20:30PM -0500, Aaron Merey wrote: > > > res = __libdw_getsrcfiles (cu->dbg, debug_line_offset, > > >__libdw_getcompdir (cudie), > > > > So is the lock t

Re: [PATCH 15/15 v4] Add tests/run-eu-search-die.sh

2025-01-24 Thread Mark Wielaard
Hi Aaron, On Sun, 2025-01-19 at 22:20 -0500, Aaron Merey wrote: > From: Heather McIntyre > > * 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:

Re: [PATCH 02/15] Change type of dwarf_lock from rwlock to mutex

2025-01-24 Thread Mark Wielaard
Hi Aaron, On Thu, 2025-01-23 at 21:13 -0500, Aaron Merey wrote: > > > If performance suffers too much from serializing all accesses to Dwarf > > > objects, we could instead consider using an rwlock with a custom wrapper > > > that implements recursive locking. > > > > We could also use multiple l

Re: [PATCH 14/15 v4] Add tests/run-eu-search-lines.sh

2025-01-24 Thread Mark Wielaard
Hi Aaron, On Sun, 2025-01-19 at 22:20 -0500, Aaron Merey wrote: > From: Heather McIntyre > > * 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

Re: [PATCH 13/15 v4] Add tests/run-eu-search-macros.sh

2025-01-24 Thread Mark Wielaard
Hi Aaron, On Sun, 2025-01-19 at 22:20 -0500, Aaron Merey wrote: > From: Heather McIntyre > > * 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-

Re: [PATCH 12/15 v4] Add tests/run-eu-search-cfi.sh

2025-01-24 Thread Mark Wielaard
Hi Aaron, On Sun, 2025-01-19 at 22:20 -0500, Aaron Merey wrote: > 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 f

Re: [PATCH 11/15] Add tests/thread-safety-subr.sh

2025-01-24 Thread Mark Wielaard
Hi Aaron, On Sun, 2025-01-19 at 22:20 -0500, Aaron Merey wrote: > thread-safety-subr.sh contains subroutine check_thread_safety_enabled > which skips further testing when either USE_LOCKS is false or when > attempting to use valgrind with address or memory sanitizer enabled. > > * tests/Mak

Re: [PATCH 10/15] Add configure option --enable-helgrind

2025-01-24 Thread Mark Wielaard
Hi Aaron, On Sun, 2025-01-19 at 22:20 -0500, Aaron Merey wrote: > Like --enable-valgrind but uses helgrind instead of memcheck. If both > --enable-valgrind and --enable-helgrind are given then helgrind takes > priority. > > * configure.ac: Add --enable-helgrind option. > * tests/Make