Hi Aaron,
On Thu, 2025-05-22 at 18:28 -0400, Aaron Merey wrote:
> Safely handle stdout output during concurrent calls to print_debug_*
> functions.
>
> For any print_debug_* function and any function that could be called
> from print_debug_* which also prints to stdout: add a FILE * argument
> an
Hi Aaron,
On Thu, 2025-06-05 at 17:12 -0400, Aaron Merey wrote:
> Signed-off-by: Aaron Merey
> ---
>
> v2: Address Mark's suggestions
> https://patchwork.sourceware.org/project/elfutils/patch/20250603012245.411580-1-ame...@redhat.com/
It does indeed. Thanks.
Just one nitpick, feel free to igno
Hi Aaron,
On Tue, May 27, 2025 at 10:04:20AM -0400, Aaron Merey wrote:
> Implement concurrent execution of print_debug_* functions during handling
> of -w, --debug-dump using libthread.a.
Do you intend to also enable this for other sections?
> A new `-C, --concurrency=NUM` command line option co
Hi Aaron,
Part 2...
On Thu, May 22, 2025 at 06:28:52PM -0400, Aaron Merey wrote:
> +typedef enum {
> + /* pthread_create has not been called. */
> + NOT_STARTED,
> +
> + /* pthread_create has been called. */
> + STARTED,
> +
> + /* The thread has finished running the job but has not been j
Hi Aaron,
On Thu, 2025-05-22 at 18:28 -0400, Aaron Merey wrote:
> Add new internal static library libthread.a that provides infrastructure
> for eu-* tools to run functions concurrently using pthreads.
>
> threadlib.c manages per-job threads as well as per-job buffers for stdout
> output. Output
Hi Aaron,
On Mon, 2025-06-02 at 21:22 -0400, Aaron Merey wrote:
> Signed-off-by: Aaron Merey
> ---
> doc/elf_begin.3 | 104
> 1 file changed, 79 insertions(+), 25 deletions(-)
>
> diff --git a/doc/elf_begin.3 b/doc/elf_begin.3
> index 6a1d0c27..c
Debian stable only has valgrind 3.19.0 which doesn't have an openat2
syscall wrapper. This makes some elfutils tests fail under valgrind
since it uses openat2 explicitly now. So switch the build factory to
not use valgrind, but the gcc address (and undefined) sanitizer.
---
builder/master.cfg | 2
If some section doesn't match between the stripped and unstripped file
we invent a new one. Make sure to also update the shnum value.
* src/unstrip.c (copy_elided_sections): Update unstripped_shnum.
Signed-off-by: Mark Wielaard
---
src/unstrip.c | 1 +
1 file changed, 1 insertion(+)
ions. Without we just use a few extra bytes on
the stack (which aren't used afterwards, without any issue, even
though it is technically UB).
* libcpu/riscv_disasm.c (riscv_disasm): Extend char mnebuf
array to 50.
Signed-off-by: Mark Wielaard
---
libcpu/riscv_disasm.c | 5 -
If there is only section zero that shouldn't count. Then we would
still try to work on an empty set of sections and give an obscure
error later.
* src/unstrip.c (copy_elided_sections): Check stripped_shnum <= 1.
Signed-off-by: Mark Wielaard
---
src/unstrip.c | 2 +-
1 file ch
__libdw_fde_by_offset is marked as an extern internal function in
libdw/cfi.h (a not public header file). But it is (now) only used in
libdw/fde.c, called from __libdw_find_fde. It was originally used for
dwarf_cfi_validate_fde, but that function was deleted and never made
public. So simplify thing
Hi Aaron,
On Thu, May 29, 2025 at 05:44:32PM -0400, Aaron Merey wrote:
> eu_tfind is used to facilitate lazy loading throughout libdw.
> If a result is not found via eu_tfind, work is done to load
> the result and cache it in an eu_search_tree.
>
> Some calls to eu_tfind allow for TOCTOU bugs. M
Hi Aaron,
On Mon, May 19, 2025 at 03:10:30PM -0400, Aaron Merey wrote:
> eu_tfind is used to facilitate lazy loading throughout libdw.
> If a result is not found via eu_tfind, work is done to load
> the result and cache it in an eu_search_tree.
>
> Some calls to eu_tfind allow for TOCTOU bugs. M
Hi,
On Tue, 2025-05-27 at 00:05 -0500, A. Wilcox wrote:
> When an explicit type of long double is specified in the ELF
> GNU_Power_ABI_FP attribute, elflint and friends were erroring out:
>
> section [36] '.gnu.attributes': offset 15: unrecognized GNU_Power_ABI_FP
> attribute value 9
>
> Ad
Hi Aaron,
On Mon, May 19, 2025 at 03:02:07PM -0400, Aaron Merey wrote:
> handle_dynamic_symtab can attempt to read symbol and version data from
> file offset of 0 or address of 0 if the associated DT_ tags aren't found.
>
> Fix this by only reading symbol and version data when non-zero file
> off
Hi Serhei,
On Wed, 2025-05-14 at 16:35 -0400, Serhei Makarov wrote:
> There's also the possibility of awk being powerful enough to make
> me want to use it. Do you know if awk is considered sufficiently
> standard for the testsuite to depend on it?
We already check for GNU awk in configure for ma
Hi Aaron,
On Mon, 2025-05-12 at 20:33 -0400, Aaron Merey wrote:
> v2: Mention ar(1) and that elfutils libelf does not support COFF object
> files.
>
> On Thu, May 1, 2025 at 1:17 PM Mark Wielaard wrote:
> >
> > > +.SH SEE ALSO
> > > +.BR libelf (3),
>
Hi Aaron,
On Mon, 2025-05-12 at 20:33 -0400, Aaron Merey wrote:
> v2: Mention use with SHT_HASH and clarify that only the lower 32 bits of
> the return value are used.
Looks good.
Thanks,
Mark
Hi Aaron,
On Mon, 2025-05-12 at 20:33 -0400, Aaron Merey wrote:
> v2: Mention fill value only applies to new gaps and set Thread Safety
> atrribute to 'MT-Unsafe race'
Looks good.
Thanks,
Mark
Hi Aaron,
On Mon, 2025-05-12 at 20:33 -0400, Aaron Merey wrote:
> v2: mention that base offset returned is always 0 for non ELF_K_AR
> kinds. Also mention elf_getaroff and elf_rawelf.
Looks good.
Thanks,
Mark
Hi Aaron,
On Mon, 2025-05-12 at 20:33 -0400, Aaron Merey wrote:
> v2: Mention elf arg may be NULL.
Looks good.
> On Wed, Apr 30, 2025 at 1:18 PM Mark Wielaard wrote:
> >
> > So we do have a tiny elf_begin.3 man page, but it doesn't really
> > describe anything.
Hi Aaron,
Yes, please.
Thanks,
Mark
Hi Serhei,
On Thu, 2025-05-08 at 18:28 -0400, Serhei Makarov wrote:
> Missing a few pieces, but worth sharing as an RFC. My idea is to
> ensure better test coverage for eu-stack and then
> eu-stacktrace+libdwfl_stacktrace by running against a live process
> with known content, stopped at a known l
Hi,
On Tue, May 06, 2025 at 11:50:12AM +0200, Mark Wielaard wrote:
> The testsuite relies on there being no files in the test directory
> after the test finishes. A test will fail if the test dir cannot be
> removed. But the test dir isn't really random, it uses the pid of the
>
Hi Aaron, Hi Constantine,
On Mon, 2025-05-05 at 10:44 -0400, Aaron Merey wrote:
> handle_dynamic_symtab can attempt to read symbol and version data from
> file offset of 0 or address of 0 if the associated DT_ tags aren't found.
>
> Fix this by only reading symbol and version data when non-zero f
those to define test_dir.
Signed-off-by: Mark Wielaard
---
tests/test-subr.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/test-subr.sh b/tests/test-subr.sh
index ea80cbec3bc7..2a956b47de2f 100644
--- a/tests/test-subr.sh
+++ b/tests/test-subr.sh
@@ -23,7 +23,9 @@
s
We want to test the program against the just build libelf.so not the
system installed one. So add an RPATH to ../libelf.
* libdw/Makefile.am (CHECK_DEF_FLAGS): Add -Wl,-rpath,../libelf.
https://sourceware.org/bugzilla/show_bug.cgi?id=32929
Signed-off-by: Mark Wielaard
---
libdw
Hi Aaron,
On Tue, 2025-04-15 at 17:04 -0400, Aaron Merey wrote:
> eu_tfind is used to facilitate lazy loading throughout libdw.
> If a result is not found via eu_tfind, work is done to load
> the result and cache it in an eu_search_tree.
>
> Some calls to eu_tfind allow for TOCTOU bugs. Multiple
Hi Aaron,
On Tue, 2025-04-01 at 00:05 -0400, Aaron Merey wrote:
> diff --git a/doc/elf_kind.3 b/doc/elf_kind.3
> new file mode 100644
> index ..3caa2724
> --- /dev/null
> +++ b/doc/elf_kind.3
> @@ -0,0 +1,71 @@
> +.TH ELF_KIND 3 2025-03-31 "Libelf" "Libelf Programmer's Manual"
> +
> +.SH N
Hi Aaron,
On Tue, 2025-04-01 at 00:05 -0400, Aaron Merey wrote:
> diff --git a/doc/elf_hash.3 b/doc/elf_hash.3
> new file mode 100644
> index ..6082c8c8
> --- /dev/null
> +++ b/doc/elf_hash.3
> @@ -0,0 +1,49 @@
> +.TH ELF_HASH 3 2025-03-31 "Libelf" "Libelf Programmer's Manual"
> +
> +.SH N
Hi Aaron,
On Tue, 2025-04-01 at 00:05 -0400, Aaron Merey wrote:
> diff --git a/doc/elf_getbase.3 b/doc/elf_getbase.3
> new file mode 100644
> index ..1934e1ac
> --- /dev/null
> +++ b/doc/elf_getbase.3
> @@ -0,0 +1,55 @@
> +.TH ELF_GETBASE 3 2025-03-31 "Libelf" "Libelf Programmer's Manual"
Hi Aaron,
On Tue, 2025-04-01 at 00:05 -0400, Aaron Merey wrote:
> diff --git a/doc/elf_fill.3 b/doc/elf_fill.3
> new file mode 100644
> index ..9448b064
> --- /dev/null
> +++ b/doc/elf_fill.3
> @@ -0,0 +1,53 @@
> +.TH ELF_FILL 3 2025-03-31 "Libelf" "Libelf Programmer's Manual"
> +
> +.SH N
Hi Aaron,
On Tue, 2025-04-01 at 00:04 -0400, Aaron Merey wrote:
> 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
>
> dif
Hi Anton,
On Thu, Feb 27, 2025 at 10:28:20PM +0100, Mark Wielaard wrote:
> > diff --git a/src/unstrip.c b/src/unstrip.c
> > index d70053de..35c04700 100644
> > --- a/src/unstrip.c
> > +++ b/src/unstrip.c
> > @@ -1974,6 +1974,9 @@ more sections in stripped file tha
Hi Anton,
On Thu, Feb 27, 2025 at 10:02:19PM +0100, Mark Wielaard wrote:
> On Thu, Feb 13, 2025 at 07:52:00PM +0300, Anton Moryakov wrote:
> > Static analyzer reported:
> > Return value of a function 'gelf_getehdr' is dereferenced at readelf.c:12443
> > witho
Hi Anton,
On Thu, Feb 27, 2025 at 06:12:36PM +0100, Mark Wielaard wrote:
> The subject isn't super helpful unless you know the specific
> terminology of the statuc analyzer you are using. It would be better to
> say something like:
>
> ar: check whether elf_getarhdr retur
Sourceware infrastructure community updates for Q1 2025
Sourceware has provided the infrastructure for core toolchain
and developer tools projects for more than 25 years.
https://sourceware.org/sourceware-25-roadmap.html
Over the last couple of years, Sourceware has transformed from a
purely volu
Hi hackers,
TLDR; When using https://patchwork.sourceware.org or Bunsen
https://builder.sourceware.org/testruns/ you might now have to enable
javascript. This should not impact any scripts, just browsers (or bots
pretending to be browsers). If it does cause trouble, please let us
know. If this wor
Hi Aaron, Hi Constantine,
On Thu, 2025-04-10 at 10:52 -0400, Aaron Merey wrote:
> handle_dynamic_symtab can attempt to read symbol and version data from
> file offset 0 if the associated DT_ tags aren't found.
>
> Fix this by only reading symbol and version data when non-zero file
> offsets have
Hi Aaron,
On Tue, Apr 08, 2025 at 01:34:28PM -0400, Aaron Merey wrote:
> LGTM. The optional main function approach opens up a lot of
> possibilities for testing static functions throughout all elfutils
> libraries.
I hope to use the same mechanism to write some fuzzing wrappers so you
don't have
Hi Dmitry,
On Fri, Apr 04, 2025 at 04:07:26PM +0300, Dmitry V. Levin wrote:
> On Fri, Apr 04, 2025 at 01:55:48PM +0200, Mark Wielaard wrote:
> > So to be (pedantically) correct should we include the attached?
>
> Yes, this should be fine, along with
>
> --- a/lib/crc32.
Hi Dmitry,
On Fri, Apr 04, 2025 at 04:04:21PM +0300, Dmitry V. Levin wrote:
> On Fri, Apr 04, 2025 at 01:38:01PM +0200, Mark Wielaard wrote:
> > But maybe we should just use AC_CHECK_HEADERS([stdatomic.h]) and drop
> > the AC_COMPILE_IFELSE trick?
>
> Sure. And if we want
Hi Michael,
On Thu, 2025-03-13 at 12:05 +0100, Michael Trapp wrote:
> Use MHD_OPTION_SOCK_ADDR to bind the http listen socket to a single address.
> The address can be any IPv4 or IPv6 address configured on the system:
> --http-addr=127.0.0.1
> --http-addr=::1
> --http-addr='ANY_ACTIVE
Hi Dmitry,
On Thu, 2025-04-03 at 19:09 +0300, Dmitry V. Levin wrote:
> On Thu, Aug 29, 2019 at 03:16:12PM +0200, Mark Wielaard wrote:
> > From: Jonathon Anderson
> >
> > Uses the stdatomic.h provided by FreeBSD when GCC doesn't (ie. GCC < 4.9)
> >
&
Hi,
On Fri, 2025-04-04 at 12:39 +, buil...@sourceware.org wrote:
> A new failure has been detected on builder elfutils-debian-armhf while
> building elfutils.
>
> Full details are available at:
> https://builder.sourceware.org/buildbot/#/builders/6/builds/403
>
> Build state: failed tes
> of including config.h twice for all files that include both
> and "system.h".
So to be (pedantically) correct should we include the attached?
Thanks,
Mark
From f14c00adb24bf15059821ca972e5d20a58b893fa Mon Sep 17 00:00:00 2001
From: Mark Wielaard
Date: Fri, 4 Apr 2025 13:50:04 +02
Hi Samuel,
On Thu, 2025-04-03 at 17:24 +1000, Samuel Zeter wrote:
> When printing section headers, also include a key to what each flag
> is at the end of the section header output.
>
> Signed-off-by: Samuel Zeter
Thanks, looks good. Committed with a slightly tweaked commit message:
commit ef1
CHECK.
(main): Likewise.
Signed-off-by: Mark Wielaard
---
libdw/Makefile.am | 11
libdw/dwarf.h | 2 +
libdw/dwarf_default_lower_bound.c | 2 +
libdw/dwarf_srclang.c | 87 ++-
4 files changed, 101 insertions(
Hi Michael,
On Thu, 2025-03-27 at 17:06 +0100, Michael Trapp wrote:
> Use MHD_OPTION_SOCK_ADDR to bind the http listen socket to a single address.
> The address should be an IPv4 or IPv6 address configured on the system:
> --listen-address=127.0.0.1
> --listen-address=::1
> --listen-ad
On Fri, Mar 14, 2025 at 01:40:42AM +0100, Mark Wielaard wrote:
> The Sourceware Project Leadership Committee would like to know who our
> users are, which hosted projects they feel part of, what services they
> rely on and what the priorities should be for new initiatives.
&
Hi Michael,
On Thu, Mar 27, 2025 at 04:43:49PM +0100, Michael Trapp wrote:
> Use MHD_OPTION_SOCK_ADDR to bind the http listen socket to a single address.
> The address should be an IPv4 or IPv6 address configured on the system:
> --listen-address=127.0.0.1
> --listen-address=::1
> --li
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 TOCTOU bug in __libdw_findcu that causes NULL to be
> incorrectly returned.
Could you explain what the issue is in a few
Using [[ is a bashism. We can just use [ since this is a simple
comparision.
* tests/thread-safety-subr.sh: Use if [ instead of if [[.
Signed-off-by: Mark Wielaard
---
tests/thread-safety-subr.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/thread-safety
Hi Michael,
On Thu, Mar 20, 2025 at 02:58:34PM +, Trapp, Michael wrote:
> > Am 19.03.2025 um 13:35 schrieb Mark Wielaard :
> > The code itself does look ok, although I think it could be simplified a
> > little if we go for something like --listen-local only (assuming th
Hi Aaron,
On Sun, 2025-03-16 at 21:51 -0400, Aaron Merey wrote:
> * libdw/dwarf_end.c (cu_free): Free str_off_base_lock.
> * libdw/libdwP.h (struct Dwarf_CU): Add str_off_base_lock member.
> (str_offsets_base_off): Add locking.
> * libdw/libdw_findcu.c (__libdw_intern_next_
Hi Aaron,
On Sun, 2025-03-16 at 21:51 -0400, Aaron Merey wrote:
> * libdw/dwarf_begin_elf.c (dwarf_begin_elf): Init macro_lock.
> * libdw/dwarf_end.c (cu_free): Free src_lock.
> (dwarf_end): Free macro_lock.
> * libdw/dwarf_getsrcfiles.c (dwarf_getsrcfiles): Use src_lock.
>
Hi Serhei,
On Sun, 2025-03-16 at 19:14 -0400, Serhei Makarov wrote:
> New data structure to coordinate caching Elf data among multiple Dwfl
> structs attached to different processes. Meant to reduce the overhead
> for profilers that use elfutils for unwinding.
>
> The caching is well-justified, a
Hi Serhei,
On Sun, Mar 16, 2025 at 07:13:00PM -0400, Serhei Makarov wrote:
> Renaming to dwfl_set_initial_registers_thread.
>
> This callback was private to one file, but now that other
> tools (eu-stacktrace, sysprof via the dwfl_perf_sample_getframes) are
> invoking the ebl set_initial_register
Hi Serhei,
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 wrapping the libebl perf register handling. In
> this patch, add an interface to access the preferred set of registers
> that
Hi Serhei,
On Sun, Mar 16, 2025 at 07:13:41PM -0400, Serhei Makarov wrote:
> Change the sample_set_initial_registers callback in eu-stacktrace to
> use the proper libebl ebl_set_initial_registers_sample function.
>
> * src/Makefile.am (stacktrace_LDADD): Add libebl.
> * src/stacktrace.c (sample_r
Hi Serhei,
On Sun, 2025-03-16 at 19:12 -0400, Serhei Makarov wrote:
> First patch of a series that reworks eu-stacktrace functionality
> into a library interface for other profiling tools.
>
> * * *
>
> As it happens, Linux perf_events and DWARF can prescribe completely
> different layouts for t
Hi Hengqi,
On Tue, 2025-03-11 at 13:27 +0800, Hengqi Chen wrote:
> I want to ask you a question regarding elf internals.
> How to calculate a symbol's file offset (which is kernel uprobe expects)
> in an elf (executable or shared object)?
Could you point me to a description of what uprobe expects
Hi Samuel,
On Mon, 2025-03-17 at 17:39 +1000, Samuel Zeter wrote:
> When printing section headers, also include a key to what each flag
> is at the end of the section header output.
Did you run make check after your patch? It seems various tests fail
because they aren't expecting the new flag inf
Hi Serhei,
On Mon, 2025-03-17 at 10:22 -0400, Serhei Makarov wrote:
> On Sun, Mar 16, 2025, at 7:12 PM, Serhei Makarov wrote:
> > +bool
> > +x86_64_set_initial_registers_sample (const Dwarf_Word *regs, uint32_t
> > n_regs,
> > +uint64_t regs_mask, uint32_t abi,
> >
The Sourceware Project Leadership Committee would like to know who our
users are, which hosted projects they feel part of, what services they
rely on and what the priorities should be for new initiatives.
https://nextcloud.sfconservancy.org/apps/forms/s/xmGgmJFzSb2FZNd58cXMtAZp
The survey will ru
.
* tests/Makefile.am (check_PROGRAMS): Add dwarf_language_lower_bound.
(TESTS): Likewise.
(dwarf_language_lower_bound_LDADD): New variable.
Signed-off-by: Mark Wielaard
---
NEWS | 2 +
libdw/dwarf_aggregate_size.c | 8 +-
libdw
.
(dwarf_srclang): If there is no DW_AT_language, try
DW_AT_language_name and DW_AT_language_version, use
language_to_srclang.
Signed-off-by: Mark Wielaard
---
libdw/dwarf_srclang.c | 221 +-
1 file changed, 218 insertions(+), 3 deletions
dwarf_lname_name.
* run-readelf-lnames.sh: New test.
* testfile-lnames.bz2: New testfile.
* tests/Makefile.am (TESTS): Add run-readelf-lnames.sh.
(EXTRA_DIST): Add run-readelf-lnames.sh and
testfile-lnames.bz2.
Signed-off-by: Mark Wielaard
---
libdw/dwarf.h
-dwarf.awk: Handle DW_LNAME.
* libdw/dwarf.h: Add DW_AT_language_name and DW_AT_language_version
plus all currently defined DW_LNAME constants. Add DW_LANG_V and
DW_LANG_Algol68.
* libdw/dwarf_default_lower_bound.c: Add DW_LANG_V and
DW_LANG_Algol68.
Signed-off-by: Mark Wielaard
Hi Aaron,
On Wed, Feb 19, 2025 at 11:36:39PM -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.
>
> --enable-helgrind requires --enable-valgrind-annotations.
>
>
Hi Frank,
On Thu, 2025-02-27 at 18:47 -0500, Frank Ch. Eigler wrote:
> > We should make dwarf_getsrcfiles and dwarf_getsrclines independent so
> > callers that onle need the file table don't need to "pay" for parsing
> > the whole line table. (I thought we had a bug for that, but cannot
> > find i
Hi Aaron,
On Wed, Feb 19, 2025 at 11:36:38PM -0500, Aaron Merey wrote:
> * libdw/dwarf_end.c (cu_free): Free str_off_base_lock.
> * libdw/libdwP.h (struct Dwarf_CU): Add str_off_base_lock member.
> (str_offsets_base_off): Add locking.
> * libdw/libdw_findcu.c (__libdw_inter
e dwarf_macro_getsrclines locking added in this patch.
That makes sense.
> On Wed, Feb 12, 2025 at 8:17 AM Mark Wielaard wrote:
> >
> > Hi Aaron,
> >
> > On Tue, 2025-02-04 at 16:50 -0500, Aaron Merey wrote:
> > > * libdw/dwarf_getsrcfiles.
Hi Aaron,
On Wed, Feb 19, 2025 at 11:36:36PM -0500, Aaron Merey wrote:
> 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.
> * li
Hi Anton,
On Thu, Feb 13, 2025 at 08:19:44PM +0300, Anton Moryakov wrote:
> Static analyzer reported:
> Return value of a function 'elf_getdata' is dereferenced at unstrip.c:1977
> without checking for NULL, but it is usually checked for this function
> (97/101).
>
> Corrections explained:
> - A
Hi Anton,
On Thu, Feb 13, 2025 at 07:52:00PM +0300, Anton Moryakov wrote:
> Static analyzer reported:
> Return value of a function 'gelf_getehdr' is dereferenced at readelf.c:12443
> without checking for NULL, but it is usually checked for this function
> (53/54).
I can see how a static analyzer
rk
>From dfa7b2c23ddabcba2a4972fa67d3c670ae31f1ee Mon Sep 17 00:00:00 2001
From: Mark Wielaard
Date: Thu, 27 Feb 2025 21:22:49 +0100
Subject: [PATCH] readelf: Use section_name instead of elf_strptr in
print_debug_frame_section
All other print_debug_* functions use section_name (ebl, shdr) t
Hi Anton,
On Thu, 2025-02-13 at 18:57 +0300, Anton Moryakov wrote:
> Report of the static analyzer:
> DEREF_OF_NULL.RET Pointer, returned from function 'elf_getarhdr' at
> readelf.c:13551,
> may be NULL and is dereferenced at readelf.c:13553.
>
> Corrections explained:
> - Added a NULL check fo
Hi Anton,
The subject isn't super helpful unless you know the specific
terminology of the statuc analyzer you are using. It would be better to
say something like:
ar: check whether elf_getarhdr returns NULL
On Thu, 2025-02-13 at 18:00 +0300, Anton Moryakov wrote:
> Report of the static analyze
st-manyfuncs.sh: Likewise.
* tests/test-manyfuncs.c: New test.
Signed-off-by: Mark Wielaard
---
libelf/elf32_getshdr.c | 14 --
libelf/elf_begin.c | 26 ---
libelf/elf_scnshndx.c| 52 -
libelf/libelf.h | 9 +-
libelf/libelfP.h
Hi Markus,
On Fri, Feb 21, 2025 at 11:19:34AM -0800, Markus Mayer wrote:
> On Aarch64, Linux is using Pointer Authentication Code (PAC) for pointer
> authentication.[1] The struct "user_pac_mask" has been part of the Linux
> kernel since version 5.0 as part of this feature. However, older kernels
Hi,
On Thu, Feb 20, 2025 at 08:18:15PM +, buil...@sourceware.org wrote:
> A new failure has been detected on builder elfutils-snapshots-coverage while
> building elfutils.
>
> Full details are available at:
> https://builder.sourceware.org/buildbot/#/builders/250/builds/210
>
> Build st
Hi Frank,
On Thu, Feb 20, 2025 at 02:18:04PM -0500, Frank Ch. Eigler wrote:
> > [...]
> > This does sounds like a bug in glibc sscanf. I cannot find a
> > description of what exactly happens with 'm' modifier allocated
> > buffers on error. So I can imagine a double free if sscanf frees the
> > bu
One of the (libcurl) libraries tries to close invalid file descriptors
on fedora s390. Skip running the testsuite under valgrind for now.
---
builder/master.cfg | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builder/master.cfg b/builder/master.cfg
index 0ccd23df9800..7a55e
Hi Frank,
On Tue, Feb 18, 2025 at 10:30:44PM -0500, Frank Ch. Eigler wrote:
> Planning to commit this shortly:
>
> commit a71bac67f4705b84368b71f5ece54deedaa1abf1 (HEAD -> master1)
> Author: Frank Ch. Eigler
> Date: Tue Feb 18 22:09:12 2025 -0500
>
> debuginfod-client: correct invalid fre
Hi Aaron,
On Thu, Feb 13, 2025 at 03:35:03PM -0500, Aaron Merey wrote:
> 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
> > un
kes a
message string to display.
(INTERNAL_ERROR): Use INTERNAL_ERROR_MSG with elf_errmsg (-1).
(remove_debug_relocations): Check the sh_link referenced
section is real and isn't a SHT_NOBITS section.
https://sourceware.org/bugzilla/show_bug.cgi?id=32673
Signed-of
d yet.
* libelf/elf_strptr.c (elf_strptr): Check strscn->rawdata_base
is not NULL.
https://sourceware.org/bugzilla/show_bug.cgi?id=32672
Signed-off-by: Mark Wielaard
---
libelf/elf_strptr.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/libelf/elf_
Hi Aaron,
On Tue, 2025-02-04 at 16:50 -0500, Aaron Merey wrote:
> 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.
Hi Aaron,
On Tue, 2025-02-04 at 16:50 -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.
>
> --enable-helgrind requires --enable-valgrind-annotations.
>
> *
Hi Aaron,
On Tue, 2025-02-04 at 16:50 -0500, Aaron Merey wrote:
> * 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_findcu already has internal locking.
Isn't that enough?
> l
Hi Aaron,
On Tue, 2025-02-04 at 16:50 -0500, Aaron Merey wrote:
> * 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
Hi Aaron,
On Tue, 2025-02-04 at 16:50 -0500, Aaron Merey wrote:
> * 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-
On Tue, 2025-02-04 at 16:50 -0500, Aaron Merey wrote:
> 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_el
Hi Anton,
On Mon, 2025-02-03 at 14:45 +0100, Mark Wielaard wrote:
> So the code path where prefix != NULL also implies suffix != NULL.
>
> Maybe the code needs a comment, check or assert to verify this?
I added an assert.
Pushed,
Mark
From 316077dd4b34c90f7e4c4228395a580e99239347 M
x27;t try to gnu decompress a
section without a name.
(print_string_section): Likewise.
https://sourceware.org/bugzilla/show_bug.cgi?id=32656
Signed-off-by: Mark Wielaard
---
src/readelf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/readelf.c b/src/readelf.c
gelf_getphdr returns NULL.
https://sourceware.org/bugzilla/show_bug.cgi?id=32655
Signed-off-by: Mark Wielaard
---
src/readelf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/readelf.c b/src/readelf.c
index c43fda35075a..21b92a08a6b6 100644
--- a/src/readelf.c
+++ b
://sourceware.org/bugzilla/show_bug.cgi?id=32654
Signed-off-by: Mark Wielaard
---
lib/system.h| 27 +++
libelf/elf_strptr.c | 18 --
src/readelf.c | 18 +++---
3 files changed, 42 insertions(+), 21 deletions(-)
diff --git a/lib/system.h b/lib
abbrev into abbrevp on success.
* libdw/libdw.h (dwarf_offabbrev): Document return values.
* libdw/libdwP.h (__libdw_getabbrev): Don't take Dwarf_Abbrev
result argument.
https://sourceware.org/bugzilla/show_bug.cgi?id=32650
Signed-off-by: Mark Wielaard
---
libdw/dw
Hi Anton,
I changed the indention from using spaces to tabs and rewrote the
subject line to better explain the change.
Pushed as attached.
Thanks,
Mark
>From 6c76ce7331e82a6fc6c2004e8e6ae51ca91f51d7 Mon Sep 17 00:00:00 2001
From: Anton Moryakov
Date: Wed, 5 Feb 2025 00:50:23 +0300
Subject: [P
1 - 100 of 1210 matches
Mail list logo