: Improved handling of corrupt ELF data.
--section-headers output now includes a "Key to Flags" explaining
section flag meanings.
* GIT SHORTLOG *
Aaron Merey (22):
configure.ac: Fix ENABLE_IMA_VERIFICATION conditional
tests/.gitignore: Add newzdata
strip: Ignore --reloc
On Fri, Apr 25, 2025 at 10:56 AM Serhei Makarov wrote:
>
> Changes for v6:
>
> - Minor fixes as requested.
>
> Changes for v2:
>
> - Merged commit 11 into commit 1 (both sample_base_addr/sample_pc and
> set_initial_registers_sample make sense to introduce in the same
> commit).
>
> - Added i38
On Fri, Apr 25, 2025 at 9:56 AM Serhei Makarov wrote:
>
>
>
> On Fri, Apr 25, 2025, at 1:57 AM, Aaron Merey wrote:
> > Also if you haven't done so already, please run any manual tests under
> > valgrind memcheck (and helgrind if you are able to test this with
On Thu, Apr 24, 2025 at 5:52 PM Serhei Makarov wrote:
>
> Changes for v4:
>
> - Separate out libdwfl_stacktrace, as requested.
>
> Changes for v3:
>
> - Fix initialization of elf in sysprof_init_dwfl
> (previously triggered -Wmaybe-uninitialized).
>
> * * *
>
> Remove the code from src/stacktrac
On Thu, Apr 24, 2025 at 5:53 PM Serhei Makarov wrote:
>
> Changes for v4:
>
> - Separate out libdwfl_stacktrace, as requested.
>
> Changes for v3:
>
> - use const void *stack, not void *, to allow users
> to pass a const stack sample
>
> Changes for v2:
>
> - use renamed __libdwfl_set_initial_re
On Thu, Apr 24, 2025 at 5:49 PM Serhei Makarov wrote:
>
> Changes for v4:
>
> - Separate out libdwfl_stacktrace, as requested.
>
> * * *
>
> Initial minimal change to ensure dwflst_tracker_find_pid is
> tested. For now, we keep the additional dwfltab implementation in
> stacktrace.c, since it's be
On Thu, Apr 24, 2025 at 5:49 PM Serhei Makarov wrote:
>
> Changes for v4:
>
> - Separate out libdwfl_stacktrace, as requested.
>
> Changes for v2:
>
> - Add locking for dwfltab.
>
> * * *
>
> New function that retrieves the Dwfl for a particular PID, or,
> if the Dwfl is absent, creates it via a p
On Thu, Apr 24, 2025 at 5:52 PM Serhei Makarov wrote:
>
> Changes for v4:
>
> - Separate out libdwfl_stacktrace, as requested.
>
> Changes for v3:
>
> - Handle dwfl->process == NULL case in __libdwfl_remove_dwfl_from_tracker.
>
> * * *
>
> The Dwflst_Process_Tracker also includes a dynamicsizehash
On Thu, Apr 24, 2025 at 5:50 PM Serhei Makarov wrote:
>
> Changes for v4:
>
> - Separate out libdwfl_stacktrace, as requested.
>
> * * *
>
> * src/Makefile.am (AM_CPPFLAGS): Include headers from
> ../libdwfl_stacktrace.
> * src/stacktrace.c (tracker): New global variable.
> (sample_callbacks):
On Thu, Apr 24, 2025 at 5:52 PM Serhei Makarov wrote:
>
> Changes for v5:
>
> - Bugfixes in dwflst_tracker_find_elf.c.
>
> Changes for v4:
>
> - Separate out libdwfl_stacktrace, as requested.
>
> - dwfl_module_getdwarf.c now uses the dwflst_tracker_cache_elf()
> interface instead of editing the
On Thu, Apr 24, 2025 at 5:48 PM Serhei Makarov wrote:
>
> Changes for v4:
>
> - Separate out libdwfl_stacktrace, as requested.
>
> * * *
>
> New data structure to coordinate caching Elf data among multiple Dwfl
> structs attached to different processes. Meant to reduce the overhead
> for profilers
On Thu, Apr 24, 2025 at 5:50 PM Serhei Makarov wrote:
>
> Changes for v5:
>
> - Separate ELFUTILS_0.193_EXPERIMENTAL namespace, mark library experimental.
>
> Changes for v4:
>
> - Separate out libdwfl_stacktrace, as requested.
>
> Changes for v2:
>
> - guard the linux/perf_events.h include proper
On Thu, Apr 24, 2025 at 5:48 PM Serhei Makarov wrote:
>
> Changes for v4:
>
> - Since __libdwfl_set_initial_registers_thread is now private to
> libdwfl, the modified code in this patch has been disabled.
>
> * * *
>
> Dummy commit to show how the sample_set_initial_registers callback in
> eu-st
On Thu, Apr 24, 2025 at 5:48 PM Serhei Makarov wrote:
>
> Changes for v2:
>
> - No longer exposing this in public libdwfl.h api.
>
> * * *
>
> Renaming pid_set_initial_registers to
> __libdwfl_set_initial_registers_thread and adding to libdwflP.h.
>
> This callback was private to one file, but now
On Thu, Apr 24, 2025 at 5:49 PM Serhei Makarov wrote:
>
> Changes for v2:
>
> - Merged commit 11 into commit 1 (both sample_base_addr/sample_pc and
> set_initial_registers_sample make sense to introduce in the same
> commit).
>
> - Added i386 backend and factored out common code.
>
> * * *
>
>
On Tue, Apr 22, 2025 at 10:24 AM Serhei Makarov wrote:
>
> On Tue, Apr 22, 2025, at 10:17 AM, Aaron Merey wrote:
> >> One question this raises re: the Dwfl_Process_Tracker structure and where
> >> its implementation should be located. In the patches, the Dwfl struct
>
On Tue, Apr 22, 2025 at 9:53 AM Serhei Makarov wrote:
> On Tue, Apr 22, 2025, at 9:45 AM, Aaron Merey wrote:
> >
> > Let's move the process_tracker interface as well for additional
> > flexibility to modify if needed. As for a name, I like
> > libdwfl_stacktr
Hi Serhei,
On Tue, Apr 22, 2025 at 9:27 AM Serhei Makarov wrote:
>
> On Mon, Apr 21, 2025, at 12:29 AM, Aaron Merey wrote:.
> >
> > I know we're close to the next release and I do want this work to be
> > included. My proposal is to move the current API out of libdw
Hi Serhei,
On Thu, Mar 20, 2025 at 9:24 AM Serhei Makarov wrote:
>
> On Wed, Mar 19, 2025, at 5:36 PM, Mark Wielaard wrote:
> >
> > On Sun, Mar 16, 2025 at 07:14:11PM -0400, Serhei Makarov wrote:
> >> Since libebl is a private interface, subsequent patches in the series
> >> introduce another api
f): Update macro_lock comment.
(struct Dwarf_CU): Declare new mutex.
libdw_findcu.c (__libdw_intern_next_unit): Initialize
intern_lock.
(__libdw_findcu): Adjust locking so that the first eu_tfind
can be done without extra lock overhead.
Signed-off-by: Aaron Merey
Hi Mark,
On Wed, Apr 2, 2025 at 8:50 AM Mark Wielaard wrote:
>
> DW_LANG_Nim and DW_LNAME_Nim were added to the DWARF languages.
>
> While adding them, and the default lower bounds, I noticed DW_LANG_V
> and DW_LANG_Algol68 where missing in srclang_to_language an internal
> helper function.
>
> T
Hi Michal,
On Tue, Apr 1, 2025 at 2:56 PM Michal Sekletar wrote:
>
> Whenever possible, resolve all symlinks as if the sysroot path were a
> chroot environment. This prevents potential interactions with files from
> the host filesystem.
>
> Signed-off-by: Michal Sekletar
> ---
> configure.ac
ed-by: Constantine Bytensky
Signed-off-by: Aaron Merey
---
src/readelf.c | 50 +++---
1 file changed, 31 insertions(+), 19 deletions(-)
diff --git a/src/readelf.c b/src/readelf.c
index 5b0e7b47..0452977f 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -30
Signed-off-by: Aaron Merey
---
doc/Makefile.am | 3 ++-
doc/elf_getbase.3 | 55 +++
2 files changed, 57 insertions(+), 1 deletion(-)
create mode 100644 doc/elf_getbase.3
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 0dec1fc7..56c56b7b
Hi everyone,
We are planning to do the 0.193 release on Friday April 25.
Since the 0.192 release last October there have been 66 commits. Among
these are some important bug fixes and new features.
If your patch is still under review [1] or you have other patches you'd
like merged before the rel
Hi Frank,
On Mon, Mar 31, 2025 at 6:29 PM Frank Ch. Eigler wrote:
>
> > Due to significant lock contention, running eu-readelf when configured
> > with --enable-thread-safety causes a major performance degradation.
> > Currently, concurrency may double the runtime of eu-readelf.
>
> > However I t
Signed-off-by: Aaron Merey
---
doc/Makefile.am | 3 ++-
doc/elf_hash.3 | 49 +
2 files changed, 51 insertions(+), 1 deletion(-)
create mode 100644 doc/elf_hash.3
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 56c56b7b..260a3f09 100644
Signed-off-by: Aaron Merey
---
doc/Makefile.am | 3 ++-
doc/elf_kind.3 | 71 +
2 files changed, 73 insertions(+), 1 deletion(-)
create mode 100644 doc/elf_kind.3
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 260a3f09..8028acb0 100644
Signed-off-by: Aaron Merey
---
doc/Makefile.am | 3 ++-
doc/elf_end.3 | 71 +
2 files changed, 73 insertions(+), 1 deletion(-)
create mode 100644 doc/elf_end.3
diff --git a/doc/Makefile.am b/doc/Makefile.am
index c95369e9..36f1855f 100644
Signed-off-by: Aaron Merey
---
doc/Makefile.am | 3 ++-
doc/elf_fill.3 | 53 +
2 files changed, 55 insertions(+), 1 deletion(-)
create mode 100644 doc/elf_fill.3
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 36f1855f..0dec1fc7 100644
* function pointers and
args to schedule_job. Also call run_jobs if thread safety
is enabled.
Signed-off-by: Aaron Merey
---
Due to significant lock contention, running eu-readelf when configured
with --enable-thread-safety causes a major performance degradation.
Currently
.
* src/threadlib.h: New file. Declares functions add_job and
run_jobs.
Signed-off-by: Aaron Merey
---
src/Makefile.am | 17
src/threadlib.c | 253
src/threadlib.h | 34 +++
3 files changed, 304 insertions(+)
create mode
Hi Mark,
On Thu, Mar 27, 2025 at 4:51 AM Mark Wielaard wrote:
>
> Hi Aaron,
>
> On Thu, Mar 27, 2025 at 12:07:18AM -0400, Aaron Merey wrote:
> > Ensure that dwarf_lock is held before accessing next_tu_offset and
> > next_cu_offset.
> >
> > This fixes a TOCT
Signed-off-by: Aaron Merey
---
tests/.gitignore | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/.gitignore b/tests/.gitignore
index f8869b40..6ae12adb 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -41,6 +41,7 @@
/dwarf_default_lower_bound
/dwarfcfi
Ensure that dwarf_lock is held before accessing next_tu_offset and
next_cu_offset.
This fixes a TOCTOU bug in __libdw_findcu that causes NULL to be
incorrectly returned.
Signed-off-by: Aaron Merey
---
libdw/libdw_findcu.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff
Hi Mark,
On Tue, Mar 11, 2025 at 6:00 AM Mark Wielaard wrote:
>
> For programs which use dwarf_srclang it might be useful to translate a
> DW_LNAME (plus version) into a DW_LANG constant if there is no
> DW_AT_language constant, but there is a DW_AT_language_name (and
> DW_AT_language_version).
>
Hi Mark,
On Tue, Mar 11, 2025 at 6:01 AM Mark Wielaard wrote:
>
> Add a testfile using GCC 15 (experimental).
>
> * libdw/dwarf.h: Add DW_LNAME_lo_user and DW_LNAME_hi_user.
> * src/readelf.c (dwarf_lname_string): New function.
> (dwarf_lname_name): Likewise.
>
Hi Mark,
On Tue, Mar 11, 2025 at 5:59 AM Mark Wielaard wrote:
>
> dwarf_language returns a DW_LNAME constant for a CU Die. If the CU Die
> has a DW_AT_language_name attribute dwarf_language will return it and
> the DW_AT_language_version attribute value. Otherwise dwarf_language
> will lookup the
Hi Mark,
On Tue, Mar 11, 2025 at 5:59 AM Mark Wielaard wrote:
>
> https://dwarfstd.org/languages-v6.html defines the DWARF v6 language
> attributes, DW_AT_language_name, DW_AT_language_version and DW_LNAME
> constants as usable by pre-DWARF v6 producers and consumers.
>
> Also add new DW_LANG_V a
Hi Michal,
On Wed, Mar 19, 2025 at 2:33 PM Michal Sekletar wrote:
>
> Whenever possible, resolve all symlinks as if the sysroot path were a
> chroot environment. This prevents potential interactions with files from
> the host filesystem.
>
> Signed-off-by: Michal Sekletar
> ---
> configure.ac
: Aaron Merey
---
v3:
https://patchwork.sourceware.org/project/elfutils/patch/20250220043644.2058519-3-ame...@redhat.com/
v4: simplify unlocking in str_offsets_base_off.
libdw/dwarf_end.c| 1 +
libdw/libdwP.h | 17 +++--
libdw/libdw_findcu.c | 1 +
3 files changed, 17
.
* libdw/dwarf_macro_getsrclines.c (dwarf_macro_getsrclines): Use
macro_lock.
* libdw/libdwP.h (struct Dwarf): Define macro_lock.
(struct Dwarf_CU): Define src_lock.
* libdw/libdw_findcu.c (__libdw_intern_next_unit): Init src_lock.
Signed-off-by: Aaron Merey
On Mon, Mar 3, 2025 at 10:02 PM Frank Ch. Eigler wrote:
>
> Hi -
>
> Thanks for the review!
>
> > On my machine memcheck reports leaks due to target_cachehdr_path
> > missing a free. [...]
>
> Sorry! I must have sent an immediately prior version of the patch;
> the following one has the missing
Hi Mark,
On Sun, Feb 23, 2025 at 6:31 PM Mark Wielaard wrote:
>
> elf_scnshndx is a elfutils extension to libelf that given a SHT_SYMTAB
> section returns the index to the corresponding SHT_SYMTAB_SHNDX
> section, if it exists. This is needed when there are more than 64K
> sections and there are
Hi Frank,
On Fri, Feb 21, 2025 at 3:07 PM Frank Ch. Eigler wrote:
>
>
> commit 082c0a94eed6706753e8019ce348be095deb72f9 (HEAD -> main)
> Author: Frank Ch. Eigler
> Date: Fri Feb 21 14:33:49 2025 -0500
>
> PR31862: debuginfod: client to cache x-debuginfod-* headers
>
> This feature allo
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: New file.
Signed-off-by: Heather S. McIntyre
Signed-off-by: Aaron Merey
-by: Aaron Merey
Signed-off-by: Mark Wielaard
---
No changes in v6.
tests/.gitignore | 1 +
tests/Makefile.am| 9 +-
tests/eu_search_lines.c | 211 +++
tests/run-eu-search-lines.sh | 31 +
4 files changed, 249 insertions(+), 3
Signed-off-by: Aaron Merey
Signed-off-by: Mark Wielaard
---
No changes in v6.
tests/.gitignore | 1 +
tests/Makefile.am | 8 +-
tests/eu_search_macros.c | 175 ++
tests/run-eu-search-macros.sh | 28 ++
4 files changed, 209
: Aaron Merey
---
v3 changes:
This patch replaces v2 04/10. 04/10 added a lock to dwarf_offdie that
was unnecessary but happened to prevent the reporting of a race condition
in str_offsets_base_off. This patch addresses the source of the race
condition.
libdw/dwarf_end.c| 1 +
libdw/libdwP.h
: Aaron Merey
---
v3 changes: More specific comment for dwarf_lock declaration.
lib/locks.h | 16
libdw/dwarf_begin_elf.c | 2 +-
libdw/dwarf_end.c | 2 +-
libdw/dwarf_formref_die.c | 4 ++--
libdw/dwarf_getalt.c | 10 +-
libdw/dwarf_setalt.c
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
USE_HELGRIND is true, then include
--tool=helgrind in the valgrind command that tests are run
under.
Signed-off-by: Aaron Merey
---
v3 changes: Add --track-fds to valgrind_cmd when USE_HELGRIND is true.
configure.ac | 16 ++--
tests/Makefile.am | 4
2 files
* libdw/dwarf_getsrcfiles.c (dwarf_getsrcfiles): Use dwarf_lock.
* libdw/dwarf_getsrclines.c (dwarf_getsrclines): Ditto.
* libdw/dwarf_macro_getsrclines.c (dwarf_macro_getsrclines):
Ditto.
Signed-off-by: Aaron Merey
---
v3 changes:
This patch replaces v2 02/10
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
---
No changes in v3
Hi Mark,
On Mon, Feb 10, 2025 at 10:49 AM Mark Wielaard wrote:
>
> __libdw_getabbrev could crash on reading a bad abbrev by trying to
> deallocate memory it didn't allocate itself. This could happen because
> dwarf_offabbrev would supply its own memory when calling
> __libdw_getabbrev. No other c
Hi Mark,
On Thu, Feb 13, 2025 at 9:04 AM Mark Wielaard wrote:
>
> We didn't check the symbol table referenced from the relocation table
> was a real symbol table. This could cause a crash if that section
> happened to be an SHT_NOBITS section without any data. Fix this by
> adding an explicit che
Hi Mark,
On Wed, Feb 12, 2025 at 6:16 PM Mark Wielaard wrote:
>
> In the unlikely situation that elf_strptr was called on a section with
> sh_size already set, but that doesn't have any data yet we could crash
> trying to verify the string to return.
>
> This could happen for example when a new s
Hi Mark,
On Mon, Feb 10, 2025 at 1:37 PM Mark Wielaard wrote:
>
> When combining eu-readelf -z with -x or -p to dump the data or strings
> in an (corrupted ELF) unnamed numbered section eu-readelf could crash
> trying to check whether the section name starts with .zdebug. Fix this
> by skipping s
Hi Mark,
On Mon, Feb 10, 2025 at 1:32 PM Mark Wielaard wrote:
>
> A corrupt ELF file can have broken program headers, in which case
> gelf_getphdr returns NULL. This could crash handle_dynamic_symtab
> while searching for the PT_DYNAMIC phdr. Fix this by checking whether
> gelf_phdr returns NULL.
Hi Mark,
On Mon, Feb 10, 2025 at 1:27 PM Mark Wielaard wrote:
>
> When dynsym/str was read through eu-readelf --dynamic by readelf
> process_symtab the string data was not validated, possibly printing
> unallocated memory past the end of the symstr data. Fix this by
> truning the elf_strptr valid
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
USE_HELGRIND is true, then include
--tool=helgrind in the valgrind command that tests are run
under.
Signed-off-by: Aaron Merey
---
v2 changes: Enabing helgrind now requires enabling annotations
configure.ac | 16 ++--
tests/Makefile.am | 6 +-
2 files
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
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
* 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
* 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
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
* 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
* 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
* 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
/libdw_findcu.c (__libdw_findcu): Ditto.
Signed-off-by: Aaron Merey
---
v2 changes: Add comments to libdwP.h locks describing which functions
they're intended to cover.
lib/locks.h | 16
libdw/dwarf_begin_elf.c | 2 +-
libdw/dwarf_end.c | 2 +-
* 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
`valgrind --track-fds=yes` will report errors for file descriptor leaks
and attempts at closing invalid file descriptors.
Signed-off-by: Aaron Merey
---
tests/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8f087798
Add calls to close for all test programs that leak file descriptors
in order to prevent test failures when run under valgrind
--track-fds=yes.
Signed-off-by: Aaron Merey
---
tests/all-dwarf-ranges.c| 2 ++
tests/alldts.c | 1 +
tests/dwarf-getmacros.c | 3 ++-
tests/dwarf
valgrind --track-fds=yes might incorrectly report an error due to the use
of inherited file descriptors in check_native_core.
Prevent this false positive by temporarily removing "--track-fds=yes" from
$VALGRIND_CMD for the duration of the testrun in check_native_core.
Signed-off-by: A
test-elf_cntl_gelf_getshdr conditionally closes a file descriptor
depending on a command line argument. This causes an error when run
under valgrind --track-fds=yes.
Fix this by unconditionally closing the fd.
Signed-off-by: Aaron Merey
---
tests/test-elf_cntl_gelf_getshdr.c | 20
process_archive may be called with an fd argument of -1, which
libelf interprets as "no file opened". However when closing
the fd process_archive does not check whether the fd is valid
and may attempt to close an fd of -1.
Signed-off-by: Aaron Merey
---
libdwfl/offline.c | 3 +
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
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 insert
Hi Mark,
> 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 to protect all paths through __libdw_getsrcf
Hi Mark,
On Wed, Jan 22, 2025 at 7:15 PM Mark Wielaard wrote:
>
> On Sun, Jan 19, 2025 at 10:20:35PM -0500, Aaron Merey wrote:
> > * libdw/dwarf_onesrcline.c (dwarf_onesrcline): Use dwarf_lock.
>
> Is this really necessary? When the user calls dwarf_onesrcline
> would
Hi Mark,
On Wed, Jan 22, 2025 at 7:12 PM Mark Wielaard wrote:
>
> On Sun, Jan 19, 2025 at 10:20:34PM -0500, Aaron Merey wrote:
> > * libdw/dwarf_offdie.c (__libdw_offdie): Use dwarf_lock.
>
> What exactly is "protected" here? If it is just the __libdw_findcu
&g
Hi Mark,
On Wed, Jan 22, 2025 at 7:08 PM Mark Wielaard wrote:
>
> On Sun, Jan 19, 2025 at 10:20:33PM -0500, Aaron Merey wrote:
> > * libdw/dwarf_lineaddr.c (dwarf_lineaddr): Use dwarf_lock.
>
> Why is this necessary? It seems this function can only be called wit
Hi Mark,
On Wed, Jan 22, 2025 at 7:06 PM Mark Wielaard wrote:
>
> On Sun, Jan 19, 2025 at 10:20:32PM -0500, Aaron Merey wrote:
> > * libdw/dwarf_getsrclines.c (read_srcfiles): Initialize dbg
> > member.
> > * libdw/libdwP.h (struct Dwarf_Fi
Hi Mark,
On Wed, Jan 22, 2025 at 6:35 PM Mark Wielaard wrote:
>
> On Sun, Jan 19, 2025 at 10:20:31PM -0500, Aaron Merey wrote:
> >else if (cu->lines == (void *) -1l)
> > return -1;
>
> Aren't we still holding the lock here?
You're right, will fix in v2.
Aaron
Hi Mark,
On Wed, Jan 22, 2025 at 5:10 PM Mark Wielaard wrote:
>
> On Sun, Jan 19, 2025 at 10:20:29PM -0500, Aaron Merey wrote:
> > * libdw/dwarf_filesrc.c (dwarf_filesrc): Use dwarf_lock.
>
> I didn't got this patch till I saw 06/15 Add Dwarf member to
> Dwarf
Hi Mark,
On Wed, Jan 22, 2025 at 4:55 PM Mark Wielaard wrote:
>
> On Sun, Jan 19, 2025 at 10:20:28PM -0500, Aaron Merey wrote:
> > Change type of dwarf_lock to mutex in order to take advantage of
> > built-in support for recursive locking.
>
> When/where do we need
Hi Mark,
On Wed, Jan 22, 2025 at 10:23 AM Mark Wielaard wrote:
> On Sun, 2025-01-19 at 22:20 -0500, Aaron Merey wrote:
> > * libdw/dwarf_begin_elf.c (dwarf_begin_elf): Initialize
> > eu_search_trees.
>
> I see the same are already eu_search_tree_fini in
On Tue, Jan 21, 2025 at 9:02 AM Mark Wielaard wrote:
>
> Hi Aaron,
>
> On Mon, 2025-01-20 at 19:38 -0500, Aaron Merey wrote:
> > If none of -e, -p or -k is given as a command line option, libdwfl
> > parse_opt will use '-e a.out' as the default.
> >
>
0. This can result in
eu-addr2line failing to correctly output the line information for a
given address.
Fix this by setting dwfl->offline_next_address to 0 when setting up
the default '-e a.out' dwfl.
https://sourceware.org/bugzilla/show_bug.cgi?id=32538
Signed-off-by: Aaron Me
Signed-off-by: Aaron Merey
Signed-off-by: Mark Wielaard
---
v3:
https://patchwork.sourceware.org/project/elfutils/patch/20240802233847.690564-9-ame...@redhat.com/
Changes in v4:
run-eu-search-tests.sh dropped and macros search_tree tests moved to
run-eu-search-macros.sh.
Formatting changes and
* libdw/dwarf_offdie.c (__libdw_offdie): Use dwarf_lock.
Signed-off-by: Aaron Merey
---
libdw/dwarf_offdie.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libdw/dwarf_offdie.c b/libdw/dwarf_offdie.c
index 883720de..74eac420 100644
--- a/libdw/dwarf_offdie.c
+++ b/libdw
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
* libdw/dwarf_onesrcline.c (dwarf_onesrcline): Use dwarf_lock.
Signed-off-by: Aaron Merey
---
libdw/dwarf_onesrcline.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libdw/dwarf_onesrcline.c b/libdw/dwarf_onesrcline.c
index 5d3c3ded..1a16269a 100644
--- a
-by: Aaron Merey
Signed-off-by: Mark Wielaard
---
v3:
https://patchwork.sourceware.org/project/elfutils/patch/20240802233847.690564-9-ame...@redhat.com/
Changes in v4:
run-eu-search-tests.sh dropped and lines search_tree tests moved to
run-eu-search-lines.sh.
Formatting changes and improved
* libdw/dwarf_lineaddr.c (dwarf_lineaddr): Use dwarf_lock.
Signed-off-by: Aaron Merey
---
libdw/dwarf_lineaddr.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libdw/dwarf_lineaddr.c b/libdw/dwarf_lineaddr.c
index 4e1952d3..bf81966c 100644
--- a/libdw/dwarf_lineaddr.c
+++ b
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: New file.
Signed-off-by: Heather S. McIntyre
Signed-off-by: Aaron Merey
-safety-subr.sh: New file.
Signed-off-by: Aaron Merey
---
tests/Makefile.am | 1 +
tests/thread-safety-subr.sh | 53 +
2 files changed, 54 insertions(+)
create mode 100644 tests/thread-safety-subr.sh
diff --git a/tests/Makefile.am b/tests
in the valgrind command that tests are run
under.
Signed-off-by: Aaron Merey
---
configure.ac | 10 --
tests/Makefile.am | 6 +-
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 1da2a12c..a78cd36f 100644
--- a/configure.ac
* libdw/dwarf_getsrclines.c (read_srcfiles): Initialize dbg
member.
* libdw/libdwP.h (struct Dwarf_Files_s): Add Dwarf member.
(struct Dwarf_Lines_s): Ditto.
Signed-off-by: Aaron Merey
---
libdw/dwarf_getsrclines.c | 4
libdw/libdwP.h| 2 ++
2
1 - 100 of 329 matches
Mail list logo