Re: [PATCH 05/13] libdwfl [5/13]: introduce Dwfl_Process_Tracker

2025-03-20 Thread Mark Wielaard
it slightly more intuitive to use. Cheers, Mark > * libdwfl/libdwfl.h (Dwfl_Process_Tracker): New struct. > (dwfl_process_tracker_begin): New function. > (dwfl_begin_with_tracker): New function. > (dwfl_process_tracker_end): New function. > * libdw/libdw.map: Add new functions.

Re: [PATCH 01/13] libebl [1/13]: api for perf register handling, start with x86_64

2025-03-18 Thread Mark Wielaard
that coding like this triggers -Werror=unused-parameter on non-x86. > I plan to fix this in the next version of the patch. In some other situations that is "solved" with marking the function arguments with __attribute__ ((unused)) (which isn't true for x86_64, but the compiler is fine with that). Cheers, Mark

Re: [PATCH 02/13] libdwfl [2/13]: expose setfunc callback for libdwfl+libebl clients

2025-03-20 Thread Mark Wielaard
libdwfl function with the above changes, but I think it is simpler/less work to just make it an internal libdwflP.h helper function. Cheers, Mark

Re: [PATCH 1/3] Add some supporting framework for C11-style atomics.

2025-04-06 Thread Mark Wielaard
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

Re: [PATCH] Avoid double-including config.h

2025-04-06 Thread Mark Wielaard
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.

Re: [PATCH 1/1] debuginfod: add --http-addr option

2025-04-05 Thread Mark Wielaard
sten-local only (assuming that makes sense). Cheers, Mark > --- > debuginfod/debuginfod.cxx | 115 ++ > doc/debuginfod.8 | 5 ++ > 2 files changed, 84 insertions(+), 36 deletions(-) > > diff --git a/debuginfod/debuginfod.cxx

Re: [PATCH 3/9 v4] libdwP.h: Add locking to str_offsets_base_off

2025-03-26 Thread Mark Wielaard
looks good. I believe that means the whole series is finally fully reviewed and approved. So please do push it. Cheers, Mark

Re: [PATCH 2/9 v4] libdw: Add locking to dwarf_getsrcfiles, dwarf_getsrclines, dwarf_macro_getsrcfiles

2025-03-26 Thread Mark Wielaard
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. >

Re: [PATCH 1/1] debuginfod: add --http-addr option

2025-03-26 Thread Mark Wielaard
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

[COMMITTED] tests/thread-safety-subr.sh: Change if [[ ]] to if [ ]

2025-03-26 Thread Mark Wielaard
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

Re: [PATCH] debuginfod: add --listen-address option

2025-03-27 Thread Mark Wielaard
d-off-by line to show they have the right to and grand others rights to use their contribution. See the CONTRIBUTING file: https://sourceware.org/cgit/elfutils/tree/CONTRIBUTING#n15 Thanks, Mark

Re: [PATCH] libdw: Add Nim language and dwarf_srclang tests

2025-04-08 Thread Mark Wielaard
on't have to create a whole valid ELF/Dwarf file. But that proved trickier than I thought. It does however seem pretty nice for these kind of tests. Cheers, Mark

Sourceware infrastructure updates for Q1 2025

2025-04-22 Thread Mark Wielaard
ailman/listinfo/overseers Please see https://sourceware.org/donate.html if you want to financially support Sourceware. Sourceware PLC, Frank Ch. Eigler, Christopher Faylor, Ian Kelling, Ian Lance Taylor, Tom Tromey, Jon Turney, Mark J. Wielaard, Elena Zannoni

Re: [PATCH] src: fix DEREF_OF_NULL.RET.STAT in readelf.c in

2025-04-29 Thread Mark Wielaard
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

Re: [PATCH] src: fix DEREF_OF_NULL.RET.STAT in unstrip.c

2025-04-29 Thread Mark Wielaard
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

Re: [PATCH] scr: fix DEREF_OF_NULL.RET.STAT in ar.c

2025-04-29 Thread Mark Wielaard
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

Re: [PATCH 1/5] doc: Add elf_end.3

2025-04-30 Thread Mark Wielaard
> +.I elf > +is NULL, then > +.B elf_end > +also returns 0. Good. > +.SH SEE ALSO > +.BR elf_begin (3), > +.BR libelf (3), > +.BR elf (5) Yes, but elf_begin (3) is currently somewhat useless. > +.SH ATTRIBUTES > +For an explanation of the terms used in this section, see > +.BR attributes (7). > +.TS > +allbox; > +lbx lb lb > +l l l. > +InterfaceAttribute Value > +T{ > +.na > +.nh > +.BR elf_end () > +T} Thread safety MT-Safe > +.TE > + > +.SH REPORTING BUGS > +Report bugs to or > https://sourceware.org/bugzilla/. > + Cheers, Mark

[PATCH] tests: Create random test_dir name

2025-05-06 Thread Mark Wielaard
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

Re: [PATCH] libdw: Fix eu_search_tree TOCTOU bugs

2025-05-02 Thread Mark Wielaard
w_str_offsets_base_off. */ >mutex_define(, str_off_base_lock); > > + /* Synchronize access to is_constant_offset. Should also be held > + when calling __libdw_intern_expression with Dwarf_CU members. */ > + mutex_define(, intern_lock); > + Right. So maybe cross reference doc between here and Dwarf_CFI_s lock? >/* Memory boundaries of this CU. */ >void *startp; >void *endp; > diff --git a/libdw/libdw_findcu.c b/libdw/libdw_findcu.c > index 0e4dcc37..59267343 100644 > --- a/libdw/libdw_findcu.c > +++ b/libdw/libdw_findcu.c > @@ -181,6 +181,7 @@ __libdw_intern_next_unit (Dwarf *dbg, bool debug_types) >rwlock_init (newp->split_lock); >mutex_init (newp->src_lock); >mutex_init (newp->str_off_base_lock); > + mutex_init (newp->intern_lock); > >/* v4 debug type units have version == 4 and unit_type == DW_UT_type. */ >if (debug_types) Ack. > @@ -240,8 +241,6 @@ struct Dwarf_CU * > internal_function > __libdw_findcu (Dwarf *dbg, Dwarf_Off start, bool v4_debug_types) > { > - mutex_lock (dbg->dwarf_lock); > - >search_tree *tree = v4_debug_types ? &dbg->tu_tree : &dbg->cu_tree; >Dwarf_Off *next_offset > = v4_debug_types ? &dbg->next_tu_offset : &dbg->next_cu_offset; > @@ -250,6 +249,12 @@ __libdw_findcu (Dwarf *dbg, Dwarf_Off start, bool > v4_debug_types) >struct Dwarf_CU fake = { .start = start, .end = 0 }; >struct Dwarf_CU **found = eu_tfind (&fake, tree, findcu_cb); >struct Dwarf_CU *result = NULL; > + if (found != NULL) > +return *found; > + > + mutex_lock (dbg->dwarf_lock); > + > + found = eu_tfind (&fake, tree, findcu_cb); >if (found != NULL) > { >mutex_unlock (dbg->dwarf_lock); OK, so in this case you do need the eu_tfind variant because both calls need to be guarded. The second call just has one more extra lock around it (the dwarf_lock) that also covers the possible eu_tsearch call. Thanks, Mark

Re: [PATCH 3/5] doc: Add elf_getbase.3

2025-05-01 Thread Mark Wielaard
inter to the same offset to read from. > +.SH ATTRIBUTES > +For an explanation of the terms used in this section, see > +.BR attributes (7). > + > +.TS > +allbox; > +lbx lb lb > +l l l. > +InterfaceAttribute Value > +T{ > +.na > +.nh > +.BR elf_getbase () > +T} Thread safety MT-Safe > +.TE > + > +.SH REPORTING BUGS > +Report bugs to or > https://sourceware.org/bugzilla/. Cheers, Mark

Re: [PATCH 2/5] doc: Add elf_fill.3

2025-05-01 Thread Mark Wielaard
TE Are you sure about it being MT-Safe. It is process wide and not bound to any particular ELF. So I would say MT-Unsafe race or MT-Unsafe const maybe? > +.SH REPORTING BUGS > +Report bugs to or > https://sourceware.org/bugzilla/. > + Cheers, Mark

Re: [PATCH 5/5] doc: Add elf_kind.3

2025-05-01 Thread Mark Wielaard
ar format, should it? Or should we have an ar.5 man page? > + > +.SH ATTRIBUTES > +For an explanation of the terms used in this section, see > +.BR attributes (7). > +.TS > +allbox; > +lbx lb lb > +l l l. > +InterfaceAttribute Value > +T{ > +.na > +.nh > +.BR elf_kind () > +T} Thread safety MT-Safe > +.TE > + > +.SH REPORTING BUGS > +Report bugs to or > https://sourceware.org/bugzilla/. Cheers, Mark

Re: [PATCH 4/5] doc: Add elf_hash.3

2025-05-01 Thread Mark Wielaard
explanation of the terms used in this section, see > +.BR attributes (7). > +.TS > +allbox; > +lbx lb lb > +l l l. > +InterfaceAttribute Value > +T{ > +.na > +.nh > +.BR elf_hash () > +T} Thread safety MT-Safe > +.TE > + > +.SH REPORTING BUGS > +Report bugs to or > https://sourceware.org/bugzilla/. Cheers, Mark

Re: [PATCH v2] src/readelf.c: Access symbol and version data only if available

2025-05-06 Thread Mark Wielaard
the verdef_data to include the verdaux. */ > - verdef_data = elf_getdata_rawchunk ( > - ebl->elf, offs[i_verdef], > - (addrs[i_verdefnum] + verdauxnum) * sizeof (GElf_Verdef), ELF_T_VDEF); > + if (offs[i_verdef] != 0 && addrs[i_verdefnum] != 0) > +verdef_data = elf_getdata_rawchunk ( > + ebl->elf, offs[i_verdef], > + (addrs[i_verdefnum] + verdauxnum) * sizeof (GElf_Verdef), ELF_T_VDEF); > >unsigned int nsyms = (unsigned int)syments; >process_symtab (ebl, nsyms, 0, 0, 0, symdata, versym_data, symstrdata, Looks good. Cheers, Mark

Re: [PATCH] src/readelf.c: Access symbol and version data only if available

2025-04-15 Thread Mark Wielaard
icitly also check that (or file a bug report to check that in the future)? Thanks, Mark > Suggested-by: Constantine Bytensky > Signed-off-by: Aaron Merey > --- > src/readelf.c | 50 +++--- > 1 file changed, 31 insertions(+), 19 deletion

[COMMITTED] libdw: Add RPATH to MAIN_CHECK programs

2025-05-02 Thread Mark Wielaard
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

scraperbot protection - Patchwork and Bunsen behind Anubis

2025-04-21 Thread Mark Wielaard
of their patrons as thank you. https://xeiaso.net/notes/2025/anubis-works/ https://xeiaso.net/patrons/ Cheers, Mark

Re: [obv] [patch] debuginfod-client memory hygiene

2025-02-19 Thread Mark Wielaard
x27;t guaranteed a valid pointer (or NULL) then this could easily lead to memory leaks. I would at least report it to glibc to see if this is intentional. Cheers, Mark

Re: [PATCH 4/9 v3] Add configure option --enable-helgrind

2025-02-28 Thread Mark Wielaard
v3 changes: Add --track-fds to valgrind_cmd when USE_HELGRIND is true. Looks OK. Once this is in we should add a buildbot with this enabled. Thanks, Mark

Re: [PATCH] src: fix DEREF_OF_NULL.RET.STAT in readelf.c in

2025-02-27 Thread Mark Wielaard
x27;t think scnname can be NULL. But this code is different from any other print_debug_* code. All other code uses section_name (Ebl *ebl, GElf_Shdr *shdr) to get the section name. So what we could do to make the static analyzer happy is simply do the same here. I pushed the attached. Cheers, Ma

Re: [PATCH] scr: fix DEREF_OF_NULL.RET.STAT in ar.c

2025-02-27 Thread Mark Wielaard
oper_insert (int oper, const char *arfname, char > **argv, int argc, >while ((subelf = elf_begin (fd, cmd, elf)) != NULL) > { >Elf_Arhdr *arhdr = elf_getarhdr (subelf); > + > + if (arhdr == NULL) > + goto next; Likewise. Thanks, Mark

Re: [PATCH] src: fix DEREF_OF_NULL.RET in readelf.c

2025-02-27 Thread Mark Wielaard
member '%s' contains:\n"), h->ar_name); > > elf_end (subelf); Again subject isn't super helpful and indentation is incorrect. Also it is easier to switch the check around to: + if (h != NULL) + printf (_("Archive member '%s' contains:\n"), h->ar_name); I made those changes and checked this in. Thanks, Mark

[PATCH 1/4] dwarf.h: Add DWARF v6 langauge attributes and DW_LNAME constants

2025-03-11 Thread Mark Wielaard
-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

[PATCH 4/4] readelf: Add support for printing DW_AT_language_name DW_LNAMEs

2025-03-11 Thread Mark Wielaard
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

[PATCH 3/4] libdw: Make dwarf_srclang forward compatible with DW_AT_language_name

2025-03-11 Thread Mark Wielaard
. (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

Re: [PATCH 2/9 v3] libdw: Add locking to dwarf_getsrcfiles, dwarf_getsrclines, dwarf_macro_getsrcfiles

2025-02-27 Thread Mark Wielaard
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.

Re: [PATCH 3/9 v3] libdwP.h: Add locking to str_offsets_base_off

2025-02-27 Thread Mark Wielaard
se_lock); } return off; > } > diff --git a/libdw/libdw_findcu.c b/libdw/libdw_findcu.c > index 613f61c8..1e96110b 100644 > --- a/libdw/libdw_findcu.c > +++ b/libdw/libdw_findcu.c > @@ -179,6 +179,7 @@ __libdw_intern_next_unit (Dwarf *dbg, bool debug_types) >eu_search_tree_init (&newp->locs_tree); >rwlock_init (newp->abbrev_lock); >rwlock_init (newp->split_lock); > + mutex_init (newp->str_off_base_lock); > >/* v4 debug type units have version == 4 and unit_type == DW_UT_type. */ >if (debug_types) OK. Cheers, Mark

Re: [PATCH] src: fix DEREF_OF_NULL.RET.STAT in readelf.c in

2025-02-27 Thread Mark Wielaard
r, is pass down that ehdr from handle_notes through the various handle_* functions. Cheers, Mark > Corrections explained: > - Added a NULL check for the ehdr variable > > Triggers found by static analyzer Svace. > > Signed-off-by: Anton Moryakov > --- > src/readelf.c

Re: [PATCH 1/9 v3] Change type of dwarf_lock from rwlock to mutex

2025-02-27 Thread Mark Wielaard
* libdw/libdwP.h (struct Dwarf): Ditto. > * libdw/libdw_findcu.c (__libdw_findcu): Ditto. > > Signed-off-by: Aaron Merey > > --- > v3 changes: More specific comment for dwarf_lock declaration. Still not a fan of these recursive mutexes, but the changes themselves look correct and the extra comments are helpful. Cheers, Mark

Re: [PATCH] src: fix DEREF_OF_NULL.RET.STAT in unstrip.c

2025-02-27 Thread Mark Wielaard
o create symbol table"); If you check this why not at the point where elf_getdata is called (symstrdata is assigned?). And then you should also check the other elf_getdata call at the same time here: symdata = elf_getdata (unstripped_symtab, NULL); symstrdata = elf_getdata (unstripped_strtab, NULL); Thanks, Mark

Re: [PATCH 2/9 v3] libdw: Add locking to dwarf_getsrcfiles, dwarf_getsrclines, dwarf_macro_getsrcfiles

2025-02-28 Thread Mark Wielaard
f > *correctness* now, and only complicating locking later when > serious contention hits to performance are indicated.) Sure. But I think the current locking proposal, using an indirect lock from a "parent" object, feels like it is harder to proof correct than having the lock in the object itself. Cheers, Mark

Re: [PATCH] libelf, readelf: Use validate_str also to check dynamic symstr data

2025-02-14 Thread Mark Wielaard
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

[PATCH] libelf: Handle elf_strptr on section without any data

2025-02-12 Thread Mark Wielaard
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_

[COMMITTED] elfutils_[try_]fedora_s390x_builder: Don't use valgrind factory

2025-02-22 Thread Mark Wielaard
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

Re: [obv] [patch] debuginfod-client memory hygiene

2025-02-23 Thread Mark Wielaard
ating various fixes since 0.192. Fedora is carrying 8 backports (plus an odd s390x endian fixup, that is probably not necessary anymore). https://src.fedoraproject.org/rpms/elfutils/tree/rawhide Cheers, Mark

Re: ☠ Buildbot (Sourceware): elfutils-snapshots-coverage - failed test (failure) (main)

2025-02-23 Thread Mark Wielaard
rage report snapshot work again: https://snapshots.sourceware.org/elfutils/coverage/latest/ Cheers, Mark

Re: [PATCH] aarch64: define struct user_pac_mask if needed

2025-02-23 Thread Mark Wielaard
lt against older kernel headers will still be fully > functional if used on a newer system This looks very nice. I added a reference to https://sourceware.org/bugzilla/show_bug.cgi?id=32684 to the commit message and pushed your commit. Thanks, Mark

[PATCH] libelf: Rewrite elf_scnshndx, extended index table handling

2025-02-23 Thread Mark Wielaard
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

Re: [PATCH v2] Add 'Key to Flags' to eu-readelf output [bz 29571]

2025-04-04 Thread Mark Wielaard
tests/run-readelf-z.sh: Add Key to Flags to expected output. * tests/run-retain.sh: Likewise. * tests/run-strip-remove-keep.sh: Likewise. https://sourceware.org/bugzilla/show_bug.cgi?id=29571 Signed-off-by: Samuel Zeter Cheers, Mark

Re: [PATCH] Avoid double-including config.h

2025-04-04 Thread Mark Wielaard
> 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

Re: ☠ Buildbot (Sourceware): elfutils - failed test (failure) (main)

2025-04-04 Thread Mark Wielaard
't seen it fail in armhf for a year, but in the last 9 days it has failed 3 times already :{ https://builder.sourceware.org/buildbot/#/builders/elfutils-debian-armhf H, Mark

Re: [PATCH] Add 'Key to Flags' to eu-readelf output [bz 29571]

2025-03-19 Thread Mark Wielaard
(" L (link order), N (extra OS processing required), G (group), T > (TLS),"); > + puts (" C (compressed), O (ordered), R (GNU retain), E (exclude)"); > +} > > /* Print the program header. */ > static void The patch itself does look correct. These are the flags that print_shdr prints if the corresponding shdr->sh_flags are set. Cheers, Mark

Re: Question about elf symbol's file offset

2025-03-19 Thread Mark Wielaard
located the symbol and/or section addresses (so whether you are reading the values from memory or on disk). Cheers, Mark

Re: Sourceware Survey 2025

2025-03-28 Thread Mark Wielaard
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. &

Re: [PATCH] debuginfod: add --listen-address option

2025-03-28 Thread Mark Wielaard
> doc/debuginfod.8 | 5 ++ > 2 files changed, 84 insertions(+), 36 deletions(-) Looks good, pushed as is. Thanks, Mark

[PATCH] libdw: Add Nim language and dwarf_srclang tests

2025-04-02 Thread Mark Wielaard
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(

Re: [COMMITTED] libdw/libdw_findcu.c: Fix TOCTOU race condition in __libdw_findcu

2025-03-27 Thread Mark Wielaard
en there are more places that might need extra guarding (or we have to write better eu-search wrappers?) Thanks, Mark > Signed-off-by: Aaron Merey > --- > libdw/libdw_findcu.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/libdw/libdw_findcu

Re: [PATCH 1/3] Add some supporting framework for C11-style atomics.

2025-04-04 Thread Mark Wielaard
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) > > &

Re: [PATCH] tests: Create random test_dir name

2025-05-13 Thread Mark Wielaard
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 >

Re: [RFC] tests/run-stack-live-test.sh: prototype 'live' eu-stack testing

2025-05-14 Thread Mark Wielaard
ost probably not generically. Especially not the container builders. But you might make some deal with a specific direct hardware worker admin? Cheers, Mark

Re: [PATCH 1/6] doc/Makefile.am: Sort manpages in alphabetical order

2025-05-14 Thread Mark Wielaard
Hi Aaron, Yes, please. Thanks, Mark

Re: [PATCH 2/6 v2] doc: Add elf_end.3

2025-05-14 Thread Mark Wielaard
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.

Re: [PATCH 3/6 v2] doc: Add elf_fill.3

2025-05-14 Thread Mark Wielaard
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

Re: [PATCH 4/6] doc: Add elf_getbase.3

2025-05-14 Thread Mark Wielaard
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

Re: [PATCH 5/6 v2] doc: Add elf_hash.3

2025-05-14 Thread Mark Wielaard
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

Re: [PATCH 6/6 v2] doc: Add elf_kind.3

2025-05-14 Thread Mark Wielaard
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), >

Re: [RFC] tests/run-stack-live-test.sh: prototype 'live' eu-stack testing

2025-05-15 Thread Mark Wielaard
configure for maintainer mode: AC_CHECK_PROG(HAVE_GAWK, gawk, yes, no) if test "$HAVE_GAWK" = "no"; then AC_MSG_ERROR([gawk needed in maintainer mode]) fi I don't think it would be a problem to do that for non-maintainer-mode too. Cheers, Mark

[Bug tools/29282] eu-addr2line -k doesn't display correct file:line in arm.

2023-10-05 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=29282 Mark Wielaard changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug general/29158] 0.187 fails to build with gcc-10: #error "Please include config.h first."

2023-10-06 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=29158 Mark Wielaard changed: What|Removed |Added Resolution|--- |WONTFIX Status

[Bug general/24068] readelf.c:10152:15: error: ‘%*llx’ directive output between 4 and 2147483647 bytes may cause result to exceed ‘INT_MAX’ [-Werror=format-overflow=] with -m32

2023-10-06 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24068 Mark Wielaard changed: What|Removed |Added Status|NEW |RESOLVED Resolution

[Bug libdw/26812] Handle dwp (DWARF Package) .debug_cu_index offsets

2023-10-06 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=26812 --- Comment #2 from Mark Wielaard --- https://inbox.sourceware.org/elfutils-devel/cover.1695837512.git.osan...@fb.com/ -- You are receiving this mail because: You are on the CC list for the bug.

[Bug libdw/26921] dwarf_getalt () not thread-safe

2023-10-06 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=26921 --- Comment #10 from Mark Wielaard --- https://inbox.sourceware.org/elfutils-devel/CAK-+vz0guN1=d5-ecurtqaf0znl+agyfg4n7pguumkwniom...@mail.gmail.com/ -- You are receiving this mail because: You are on the CC list for the bug.

[Bug libdw/26930] tsearch/tfind tree caches need locking

2023-10-06 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=26930 --- Comment #2 from Mark Wielaard --- https://inbox.sourceware.org/elfutils-devel/CAK-+vz0guN1=d5-ecurtqaf0znl+agyfg4n7pguumkwniom...@mail.gmail.com/ -- You are receiving this mail because: You are on the CC list for the bug.

[Bug libdw/28148] eu-addr2line reports function name of the caller when code is inlined

2023-10-06 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=28148 Mark Wielaard changed: What|Removed |Added CC||mark at klomp dot org --- Comment #1

[Bug libdw/27805] libdwfl: Unable to extract source line information for RISC-V binary

2023-10-06 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=27805 --- Comment #7 from Mark Wielaard --- Do as suggested in comment #1 (and what binutils apparently does), skip zero entries when not at the end of the table: https://inbox.sourceware.org/elfutils-devel/20231006120329.340788-1-m...@klomp.org/T

[Bug libelf/29744] Please Provide the libelf.h standard and source documents

2023-10-06 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=29744 Mark Wielaard changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution

[Bug tools/24086] memory leak issues in eu-strip on invalid ELF file

2023-10-06 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24086 Mark Wielaard changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution

[Bug debuginfod/28240] debuginfod client cache falsely sticky for root user

2023-10-09 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=28240 --- Comment #4 from Mark Wielaard --- (In reply to Mark Wielaard from comment #3) > So I think this is resolved now. But would like someone else to double > check. These races are tricky. That was 3 months ago. Can we assume this is

[Bug libdw/27805] libdwfl: Unable to extract source line information for RISC-V binary

2023-10-09 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=27805 Mark Wielaard changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution

[Bug libdw/30967] Discriminator in Dwarf_Line_s may exceed 24 bits

2023-10-12 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30967 Mark Wielaard changed: What|Removed |Added CC||mark at klomp dot org --- Comment #2

[Bug debuginfod/28240] debuginfod client cache falsely sticky for root user

2023-10-16 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=28240 Mark Wielaard changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution

[Bug libdw/30980] offline.c:53: dwfl_offline_section_address: Assertion `mod->e_type == ET_REL' failed.

2023-10-18 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30980 Mark Wielaard changed: What|Removed |Added CC||mark at klomp dot org --- Comment #1

[Bug libdw/30980] offline.c:53: dwfl_offline_section_address: Assertion `mod->e_type == ET_REL' failed.

2023-10-18 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30980 --- Comment #2 from Mark Wielaard --- This however is really odd and might explain why we get onto an ET_REL path: $ eu-readelf -x .gnu_debuglink ~/Downloads/libjavascriptcoregtk-4.1.so.0.4.10.zst Hex dump of section [28] '.gnu_debu

[Bug libdw/30980] offline.c:53: dwfl_offline_section_address: Assertion `mod->e_type == ET_REL' failed.

2023-10-18 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30980 --- Comment #3 from Mark Wielaard --- Would you happen to know where systemd-stable/src/coredump/coredump.c and systemd-stable/src/shared/elf-util.c come from? I am trying to figure out how the dwfl has been setup that parse_core uses, but I

[Bug libdw/30980] offline.c:53: dwfl_offline_section_address: Assertion `mod->e_type == ET_REL' failed.

2023-10-18 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30980 --- Comment #4 from Mark Wielaard --- O, apparently systemd isn't updated on freedesktop.org anymore. So my git repo is stale. The copy on github (sigh) does have those files and the parse_core function. The dwfl setup is done

[Bug libdw/30967] Discriminator in Dwarf_Line_s may exceed 24 bits

2023-10-26 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30967 Mark Wielaard changed: What|Removed |Added CC||roland at gnu dot org --- Comment #5

[Bug libdw/30967] Discriminator in Dwarf_Line_s may exceed 24 bits

2023-10-26 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30967 --- Comment #6 from Mark Wielaard --- So my preferred workaround: diff --git a/libdw/dwarf_getsrclines.c b/libdw/dwarf_getsrclines.c index df003c5f..69e10c7b 100644 --- a/libdw/dwarf_getsrclines.c +++ b/libdw/dwarf_getsrclines.c @@ -129,6

[Bug libdw/30967] Discriminator in Dwarf_Line_s may exceed 24 bits

2023-10-26 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30967 --- Comment #10 from Mark Wielaard --- (In reply to Frank Ch. Eigler from comment #7) > > So my preferred workaround: > > appears to be based on the assumption that truncated bitfields will not > collide. Has this assumpt

[Bug libdw/30967] Discriminator in Dwarf_Line_s may exceed 24 bits

2023-10-31 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30967 --- Comment #13 from Mark Wielaard --- (In reply to Aleksei Vetrov from comment #12) > (In reply to Mark Wielaard from comment #6) > > So my preferred workaround: > > https://code.wildebeest.org/git/user/mjw/elfutils/commit/

[Bug libdw/30967] Discriminator in Dwarf_Line_s may exceed 24 bits

2023-10-31 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30967 Mark Wielaard changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed

[Bug libdw/30980] offline.c:53: dwfl_offline_section_address: Assertion `mod->e_type == ET_REL' failed.

2023-11-02 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30980 --- Comment #6 from Mark Wielaard --- Thanks, that seems to be the correct thing to do here. Note that there are a couple more asserts on this code path. In particular in __libdwfl_find_elf_build_id there is what apparently is the root of

[Bug libdw/30948] src/stack doesn't show source inforamtion if the target is compiled with clang

2023-11-02 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30948 Mark Wielaard changed: What|Removed |Added CC||mark at klomp dot org --- Comment #1

[Bug libdw/28148] eu-addr2line reports function name of the caller when code is inlined

2023-11-02 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=28148 Mark Wielaard changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED

[Bug tools/30986] Bug Report: elfutils eu-addr2line not working correctly with Rust inline functions

2023-11-02 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30986 Mark Wielaard changed: What|Removed |Added CC||mark at klomp dot org Last

[Bug general/30975] elfutils incorrectly reports core files with non-contiguous segments

2023-11-02 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30975 Mark Wielaard changed: What|Removed |Added Last reconfirmed||2023-11-02 Status

[Bug libdw/30948] src/stack doesn't show source inforamtion if the target is compiled with clang

2023-11-07 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30948 --- Comment #3 from Mark Wielaard --- See also https://sourceware.org/bugzilla/show_bug.cgi?id=22288 The issue is that we rely on .debug_aranges to know whether a (code) address is described in a particular DWARF CU (and from there which

[Bug tools/31058] global-buffer-overflow exists in the function ebl_machine_flag_name in eblmachineflagname.c

2023-11-13 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=31058 Mark Wielaard changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution

[Bug tools/31059] Floating Point Exception exists in the function handle_relocs_relr in readelf.c

2023-11-13 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=31059 Mark Wielaard changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC

[Bug libdw/31111] Handle Clang DWARF 5 DW_AT_decl_file 0

2023-12-04 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=3 Mark Wielaard changed: What|Removed |Added CC||mark at klomp dot org --- Comment #1

[Bug tools/31114] New: eu-readelf --debug-dump=info cannot show mega-enum

2023-12-05 Thread mark at klomp dot org
Component: tools Assignee: unassigned at sourceware dot org Reporter: mark at klomp dot org CC: elfutils-devel at sourceware dot org Target Milestone: --- Created attachment 15238 --> https://sourceware.org/bugzilla/attachment.cgi?id=15238&action=edit me

<    22   23   24   25   26   27   28   29   30   31   >