Re: [PATCH 2/7] elf_getarhdr: Replace per-archive Elf_Arhdr storage with per-member storage

2025-07-15 Thread Mark Wielaard
; + printf ("Error while freeing subELF descriptor: %s\n", > + elf_errmsg (-1)); > + exit (1); > + } > + > + hdr_list = cur->next; > + free (cur); > + } > + > + /* Close the archive descriptor. */ > + if (elf_end (elf) != 0) > { > printf ("Freeing ELF descriptors failed: %s", elf_errmsg (-1)); > exit (1); > > @@ -144,12 +202,6 @@ Failed to get base address for the archive element: > %s\n", > >/* Get next archive element. */ >cmd = elf_next (subelf); > - if (elf_end (subelf) != 0) > - { > - printf ("error while freeing sub-ELF descriptor: %s\n", > - elf_errmsg (-1)); > - exit (1); > - } > } > >/* When we reach this point we haven't found the given file in the Nice test. Cheers, Mark

Re: [PATCH 1/7] elf_getaroff: Fix elf_getaroff error return value

2025-07-15 Thread Mark Wielaard
u-ar assumes -1 indicates an error and other libelf implementations > use -1 to indicate an error in elf_getaroff. > > Replace ELF_C_NULL with -1 as elf_getaroff's error return value. I agree this makes sense given elf_getaroff returns an offset. Thanks, Mark

Re: [PATCH 16/16] doc: Add elf_strptr.3

2025-07-10 Thread Mark Wielaard
in the string table if successful. > +Returns > +.B NULL > +on error. > + > +.SH SEE ALSO > +.BR elf (3), > +.BR elf_getscn (3), > +.BR libelf (3), > +.BR elf (5) Maybe add elf32/64_getshdr and gelf_getsym as examples of sh_name (.shstrtab) or st_name (.strtab) getting name strings? > + > +.SH ATTRIBUTES > +.TS > +allbox; > +lbx lb lb > +l l l. > +InterfaceAttribute Value > +T{ > +.na > +.nh > +.BR elf_strptr () > +T} Thread safety MT-Safe > +.TE > + > +.SH REPORTING BUGS > +Report bugs to or > https://sourceware.org/bugzilla/. OK. Thanks, Mark

Re: [PATCH 15/16] doc: Add elf_scnshndx.3

2025-07-10 Thread Mark Wielaard
t; +T} Thread safety MT-Safe > +.TE > + > +.SH REPORTING BUGS > +Report bugs to or > https://sourceware.org/bugzilla/. > + > +.SH HISTORY > +.B elf_scnshndx > +first appeared in elfutils 0.132. This function is a elfutils libelf > extension and > +may not be available in other libelf implementations. OK. Thanks, Mark

Re: [PATCH 14/16] doc: Add elf_rawfile.3

2025-07-10 Thread Mark Wielaard
> +.I *ptr > +(if non-NULL) is set to 0. OK. > +.SH SEE ALSO > +.BR libelf (3), > +.BR elf (5) > + > +.SH ATTRIBUTES > +.TS > +allbox; > +lbx lb lb > +l l l. > +InterfaceAttribute Value > +T{ > +.na > +.nh > +.BR elf_rawfile () > +T} Thread safety MT-Safe > +.TE > + > +.SH REPORTING BUGS > +Report bugs to or > https://sourceware.org/bugzilla/. OK. Thanks, Mark

Re: [PATCH 13/16] doc: Add elf_rawdata.3

2025-07-09 Thread Mark Wielaard
ing the raw contents of the section. On failure, > +.B NULL > +is returned. OK. > +.SH SEE ALSO > +.BR elf_getdata (3), > +.BR elf_getscn (3), > +.BR elf_compress (3), > +.BR libelf (3), > +.BR elf (5) > + > +.SH ATTRIBUTES > +.TS > +allbox; > +lbx lb lb > +l l l. > +InterfaceAttribute Value > +T{ > +.na > +.nh > +.BR elf_rawdata () > +T} Thread safety MT-Safe > +.TE > + > +.SH REPORTING BUGS > +Report bugs to or > https://sourceware.org/bugzilla/. OK. Thanks, Mark

Re: [PATCH 12/16] doc: Add elf_rand.3

2025-07-09 Thread Mark Wielaard
lf_next (3), > +.BR libelf (3), > +.BR elf (5) Add elf_getarsym. > +.SH ATTRIBUTES > +.TS > +allbox; > +lbx lb lb > +l l l. > +InterfaceAttribute Value > +T{ > +.na > +.nh > +.BR elf_rand () > +T} Thread safety MT-Safe > +.TE > + > +.SH REPORTING BUGS > +Report bugs to or > https://sourceware.org/bugzilla/. OK. Thanks, Mark

Re: [PATCH 11/16] doc: Add elf_nextscn.3

2025-07-08 Thread Mark Wielaard
> +.SH ATTRIBUTES > +.TS > +allbox; > +lbx lb lb > +l l l. > +InterfaceAttribute Value > +T{ > +.na > +.nh > +.BR elf_nextscn () > +T} Thread safety MT-Safe > +.TE > + > +.SH REPORTING BUGS > +Report bugs to or > https://sourceware.org/bugzilla/. OK. Thanks, Mark

Re: [PATCH 10/16] doc: Add elf_newscn.3

2025-07-08 Thread Mark Wielaard
L, failure is returned and elf_errno is not (re)set. > + > +.SH SEE ALSO > +.BR elf_getshdr (3), elf32_getshdr elf64_getshdr > +.BR elf_getdata (3), > +.BR elf_newdata (3), > +.BR elf_update (3), > +.BR libelf (3), > +.BR elf (5) OK. > +.SH ATTRIBUTES > +.TS > +allbox; > +lbx lb lb > +l l l. > +InterfaceAttribute Value > +T{ > +.na > +.nh > +.BR elf_newscn () > +T} Thread safety MT-Safe > +.TE > + > +.SH REPORTING BUGS > +Report bugs to or > https://sourceware.org/bugzilla/. OK. Thanks, Mark

Re: [PATCH 09/16] doc: Add elf_newdata.3

2025-07-08 Thread Mark Wielaard
wscn (3), > +.BR elf_update (3), > +.BR libelf (3), > +.BR elf (5) OK. > +.SH ATTRIBUTES > +.TS > +allbox; > +lbx lb lb > +l l l. > +InterfaceAttribute Value > +T{ > +.na > +.nh > +.BR elf_newdata () > +T} Thread safety MT-Safe > +.TE > + > +.SH REPORTING BUGS > +Report bugs to or > https://sourceware.org/bugzilla/. OK. Some of the lines are very wide though. Thanks, Mark

Re: [PATCH 08/16] doc: Add elf_gnu_hash.3

2025-07-08 Thread Mark Wielaard
32 bits of the return value are used. OK. > @@ -43,9 +52,14 @@ Interface Attribute Value > T{ > .na > .nh > -.BR elf_hash () > +.BR elf_hash (),\~elf_gnu_hash () > T} Thread safety MT-Safe > .TE > > .SH REPORTING BUGS > Report bugs to or > https://sourceware.org/bugzilla/. > + > +.SH HISTORY > +.B elf_gnu_hash > +first appeared in elfutils 0.122. This function is a elfutils libelf > extension and > +may not be available in other libelf implementations. OK. Thanks, Mark

Re: [PATCH 07/16] doc: Add elf_getshdrstrndx.3 and elf_getshstrndx.3

2025-07-08 Thread Mark Wielaard
GETSHDRSTRNDX 3 2025-06-30 "Libelf" "Libelf Programmer's Manual" > + > +.SH NAME > +elf_getshdrstrndx, elf_getshstrndx \- retrieve the section header string > table index > +.SH SYNOPSIS > +.nf > +#include > + > +.B int elf_getshdrstrndx("Elf

Re: [PATCH 06/16] doc: Add elf_getshdrnum.3 and elf_getshnum.3

2025-07-08 Thread Mark Wielaard
uot;Libelf Programmer's Manual" > + > +.SH NAME > +elf_getshdrnum, elf_getshnum \- retrieve the number of section headers in an > ELF file > +.SH SYNOPSIS > +.nf > +#include > + > +.B int elf_getshdrnum("Elf *elf", "size_t *dst"); > +.

Re: [PATCH 05/16] doc: Add elf_getphdrnum.3

2025-07-08 Thread Mark Wielaard
f > +is NULL. OK. > +.SH SEE ALSO > +.BR libelf (3), > +.BR elf (5) elf32_getphdr/elf64_getphdr? > +.SH ATTRIBUTES > +.TS > +allbox; > +lbx lb lb > +l l l. > +InterfaceAttribute Value > +T{ > +.na > +.nh > +.BR elf_getphdrnum () > +T} Thread safety MT-Safe > +.TE > + > +.SH REPORTING BUGS > +Report bugs to or > https://sourceware.org/bugzilla/. OK. Cheers, Mark

Re: [PATCH 04/16] doc: Add elf_getident.3

2025-07-07 Thread Mark Wielaard
index part confused me. > +.SH SEE ALSO > +.BR libelf (3), > +.BR elf (5) OK. > +.SH ATTRIBUTES > +.TS > +allbox; > +lbx lb lb > +l l l. > +InterfaceAttribute Value > +T{ > +.na > +.nh > +.BR elf_getident () > +T} Thread safety MT-Safe > +.TE > + > +.SH REPORTING BUGS > +Report bugs to or > https://sourceware.org/bugzilla/. OK. Thanks, Mark

Re: [PATCH 03/16] doc: Add elf_getdata_rawchunk.3

2025-07-07 Thread Mark Wielaard
t;lock. Checks whether it can find an existing Elf_Data_Chunk. If yes, it returns that one. Which seems fine. But if not it inserts the dummy chunk without actually data, allocates/creates the data, drops the rdlock (!), takes a write lock and overwrites the dummy chunk with the real data, drops the lock again and returns the data. What if at (!) another call gets the read lock first before the current thread can (re)take the write lock? That other thread could find the existing dummy key already in the cache and return the dummy data? > +.SH REPORTING BUGS > +Report bugs to or > https://sourceware.org/bugzilla/. > + > +.SH HISTORY > +.B elf_getdata_rawchunk > +first appeared in elfutils 0.130. This function is a elfutils libelf > extension and > +may not be available in other libelf implementations. Yes. Thanks, Mark

Re: [PATCH 02/16] doc: Add elf_flag*.3

2025-07-04 Thread Mark Wielaard
Hi Aaron, On Mon, Jun 30, 2025 at 11:12:19PM -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > --- > doc/Makefile.am| 6 ++ > doc/elf_flagdata.3 | 1 + > doc/elf_flagehdr.3 | 1 + > doc/elf_flagelf.3 | 145 + > doc/elf_flagphdr.3 |

Re: [PATCH 01/16] doc: Add elf_memory.3

2025-07-04 Thread Mark Wielaard
Hi Aaron, On Mon, Jun 30, 2025 at 11:12:18PM -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > --- > doc/Makefile.am | 1 + > doc/elf_memory.3 | 84 > 2 files changed, 85 insertions(+) > create mode 100644 doc/elf_memory.3 > > diff --gi

Re: [PATCH] libdwP.h: Remove abbrev_lock

2025-07-03 Thread Mark Wielaard
Hi Aaron, On Sun, 2025-06-22 at 20:00 -0400, Aaron Merey wrote: > Improve __libdw_dieabbrev performance by removing abbrev_lock. This > lock protects the Dwarf_Die abbrev member due to lazy loading. > > Instead, eagerly load abbrev during Dwarf_Die initialization so that > the member is readonly

Re: [PATCH 6/6] doc: Add elf_compress.3 and elf_compress_gnu.3

2025-07-03 Thread Mark Wielaard
f_compress () > +and > +.BR elf_compress_gnu () > +modify the contents of a section in an ELF descriptor by compressing or > +decompressing the section data and adjusting the section header. These > changes > +take effect when the ELF descriptor is written with > +.BR elf_upda

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

2025-07-03 Thread Mark Wielaard
errmsg (3), > +.BR elf (5) > + > +.SH ATTRIBUTES > +.TS > +allbox; > +lbx lb lb > +l l l. > +Interface Attribute Value > +T{ > +.na > +.nh > +.BR elf_cntl () > +T} Thread safety MT-Safe > +.TE > + > +.SH REPORTING BUGS > +Report bugs to or > https://sourceware.org/bugzilla/. Looks good, Mark

Re: [PATCH 3/3 v4] src/readelf.c: Support concurrency for -w, --debug-dump

2025-07-02 Thread Mark Wielaard
en print_debug_unit has: const bool silent = !(print_debug_sections & section_info) && !debug_types; And even when silent it then does various notice_listptr calls. Confusing :) I wonder if it still makes sense to have this extra notice_listptr pass inside print_debug_unit and whether we shouldn't just have a dedicated pass for it that then can run before the printing of any other debug section (if needed). But yes, I see now. That is for later. Getting back to the actual change: > /* To store the name used in compare_listptr */ > -static const char *sort_listptr_name; > +_Thread_local const char *sort_listptr_name; Should it still be static? Should we maybe include and use thread_local instead? I read over the whole patch and don't have any other comments. Looks good. Thanks, Mark

Re: [PATCH 1/3 v3] src: Add threadlib library for parallel job execution

2025-07-02 Thread Mark Wielaard
gt; > Yes exit will terminate the whole program in this case. OK. Then we should make sure that they output their warning/error message to stderr and not their current stream (because that will be lost). I think that happens automatically when using error() to exit. Cheers, Mark

Re: [PATCH] readelf.c: Avoid repeating calls to gettext _() in hotpath

2025-07-02 Thread Mark Wielaard
> + fputs (__("\nFile name table:\n"), out); >if (version > 4) > { > struct encpair { uint16_t desc; uint16_t form; }; > struct encpair enc[256]; > > - fprintf (out, _(" [")); > + fprintf (out, " ["); > if ((size_t) (lineendp - linep) < 1) > goto invalid_data; > unsigned char file_name_format_count = *linep++; Likewise. > @@ -9528,11 +9602,11 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl > *ebl, GElf_Ehdr *ehdr, > >if (linep == lineendp) > { > - fputs (_("\nNo line number statements.\n"), out); > + fputs (__("\nNo line number statements.\n"), out); > continue; > } > > - fputs (_("\nLine number statements:\n"), out); > + fputs (__("\nLine number statements:\n"), out); >Dwarf_Word address = 0; >unsigned int op_index = 0; >size_t line = 1; > @@ -9581,15 +9655,25 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl > *ebl, GElf_Ehdr *ehdr, > line += line_increment; > advance_pc ((opcode - opcode_base) / line_range); > > - fprintf (out, _(" special opcode %u: address+%u = "), > + IGNORE_FMT_NONLITERAL_BEGIN > + fprintf (out, __(" special opcode %u: address+%u = "), > opcode, op_addr_advance); > + IGNORE_FMT_NONLITERAL_END > print_dwarf_addr (dwflmod, 0, address, address, out); > if (op_index > 0) > - fprintf (out, _(", op_index = %u, line%+d = %zu\n"), > - op_index, line_increment, line); > + { > + IGNORE_FMT_NONLITERAL_BEGIN > + fprintf (out, __(", op_index = %u, line%+d = %zu\n"), > +op_index, line_increment, line); > + IGNORE_FMT_NONLITERAL_END > + } > else > - fprintf (out, _(", line%+d = %zu\n"), > - line_increment, line); > + { > + IGNORE_FMT_NONLITERAL_BEGIN > + fprintf (out, __(", line%+d = %zu\n"), > +line_increment, line); > + IGNORE_FMT_NONLITERAL_END > + } > } "line" can probably be translated, but "op_index" is how it is called in the spec. Similar comments for the rest of the patch. I really don't like the macros and the __ very much. If at all possible I would just do this with explicit static char *frob_str = _("frob"); strings. Cheers, Mark

Re: [PATCH 2/3 v3] src/readelf.c: Add support for print_debug_* output buffering

2025-07-02 Thread Mark Wielaard
me (so those can be parallelized too). The attrcb_args callback support already seems ready for that. But that is all for some future. Cheers, Mark

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

2025-06-27 Thread Mark Wielaard
Hi Aaron, On Sun, Jun 22, 2025 at 07:02:06PM -0400, Aaron Merey wrote: > v2: Clarify that narsyms can be NULL and that the end of the > archive symbol table contains a special NULL entry. Looks good to me. Thanks, Mark>

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

2025-06-27 Thread Mark Wielaard
Hi Aaron, On Sun, Jun 22, 2025 at 07:02:05PM -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > > --- > v2 changes: clarify when changes to the parent archive descriptor > invalidate the return value. Change thread safety attribute to > MT-Unsafe race. So I think this describes the curren

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

2025-06-27 Thread Mark Wielaard
and return -1 on error. > +.SH SEE ALSO > +.BR elf_begin (3), > +.BR elf_next (3), > +.BR elf_rand (3), > +.BR libelf (3), > +.BR elf (5) > + > +.SH ATTRIBUTES > +.TS > +allbox; > +lbx lb lb > +l l l. > +InterfaceAttribute Value > +T{ > +.na > +.nh > +.BR elf_getaroff () > +T} Thread safety MT-Safe > +.TE > + > +.SH REPORTING BUGS > +Report bugs to or > https://sourceware.org/bugzilla/. > + > +.SH HISTORY > +.B elf_getaroff > +first appeared in elfutils 0.114. This elfutils libelf function may not be > +found in other libelf implementations. Looks good otherwise. Thanks, Mark

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

2025-06-27 Thread Mark Wielaard
Hi Aaron, On Sun, Jun 22, 2025 at 07:02:03PM -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > > --- > v2: Clarify that elf_next is called with an archive member in order > to update the descriptor for the parent archive. Added a code example. Looks nice. Just two small questions below.

[Bug general/33103] elfutils fails in-tree build due to ./stack binary #included via

2025-06-26 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=33103 --- Comment #6 from Mark Wielaard --- Note that a followup commit was necessary to fix building one testcase that broke make check: commit 65d383a7e653524388ff2ea382be3eac1d04061f (HEAD -> main) Author: Mark Wielaard Date: Thu Jun 26

[COMMITTED] libdw: Add DEFAULT_INCLUDES to CHECK_DEF_FLAGS

2025-06-26 Thread Mark Wielaard
DEFAULT_INCLUDES includes -I. which is needed for compiling the testcases with -DMAIN_CHECK=1. This fixes make check after commit 76bd5f6bea9b "config: Adjust AM_CPPFLAGS for srcdir and .. path includes" * libdw/Makefile.am (CHECK_DEF_FLAGS): Add DEFAULT_INCLUDES. Signed-of

[Bug general/33103] elfutils fails in-tree build due to ./stack binary #included via

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

[COMMITTED] config: Adjust AM_CPPFLAGS for srcdir and .. path includes

2025-06-26 Thread Mark Wielaard
ed header files. * config/eu.am (AM_CPPFLAGS): Use -iquote for $(srcdir) and replace -I.. with -I$(abs_top_builddir). * libdw/libdwP.h: Include "libdw.h" and "dwarf.h" instead of the system headers and . https://sourceware.org/bugzilla/show_bu

[Bug general/33103] elfutils fails in-tree build due to ./stack binary #included via

2025-06-25 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=33103 --- Comment #3 from Mark Wielaard --- I don't understand why this is only a problem with srcdir == builddir. But maybe we can extend the original solution to use -iquote for srcdir. And only have -I for lib and the top builddir (for )?

[Bug general/33103] elfutils fails in-tree build due to ./stack binary #included via

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

[Bug libelf/33099] heap overflow in print_dwarf_addr

2025-06-24 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=33099 Mark Wielaard changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution

[PATCH] libdwl: Add validate_strdata to limit Elf_Data d_size to valid strings.

2025-06-22 Thread Mark Wielaard
(validate_strdata): New function taking Elf_Data and restricting d_size to last zero char. (translate_offs): Call validate_strdata. (find_symtab): Likewise for both symstrdata and aux_symstrdata. https://sourceware.org/bugzilla/show_bug.cgi?id=33099 Signed-off-by: Mark

[Bug libelf/33099] heap overflow in print_dwarf_addr

2025-06-22 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=33099 Mark Wielaard changed: What|Removed |Added Status|NEW |ASSIGNED --- Comment #4 from Mark

[Bug libelf/33099] heap overflow in print_dwarf_addr

2025-06-20 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=33099 Mark Wielaard changed: What|Removed |Added CC||mark at klomp dot org

Re: [PATCH 4/4] doc: Add elf_getarsym.3

2025-06-17 Thread Mark Wielaard
Hi Aaron, On Mon, Jun 09, 2025 at 12:24:39PM -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > --- > doc/Makefile.am| 1 + > doc/elf_getarsym.3 | 91 ++ > 2 files changed, 92 insertions(+) > create mode 100644 doc/elf_getarsym.3 > > diff

Re: [PATCH 3/4] doc: Add elf_getarhdr.3

2025-06-17 Thread Mark Wielaard
Hi Aaron, On Mon, Jun 09, 2025 at 12:24:38PM -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > --- > doc/Makefile.am| 1 + > doc/elf_getarhdr.3 | 76 ++ > 2 files changed, 77 insertions(+) > create mode 100644 doc/elf_getarhdr.3 > > diff

Re: [PATCH 2/4] doc: Add elf_getaroff.3

2025-06-17 Thread Mark Wielaard
Hi Aaron, On Mon, 2025-06-09 at 12:24 -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > --- > doc/Makefile.am| 1 + > doc/elf_getaroff.3 | 55 ++ > 2 files changed, 56 insertions(+) > create mode 100644 doc/elf_getaroff.3 > > diff --git a

Re: [PATCH 1/4] doc: Add elf_next.3

2025-06-17 Thread Mark Wielaard
Hi Aaron, On Mon, 2025-06-09 at 12:24 -0400, Aaron Merey wrote: > diff --git a/doc/Makefile.am b/doc/Makefile.am > index 1ced7858..fbfebfe0 100644 > --- a/doc/Makefile.am > +++ b/doc/Makefile.am > @@ -61,6 +61,7 @@ notrans_dist_man3_MANS= elf32_checksum.3 \ > elf_hash.3 \ >

[Bug tools/33062] speed up readelf default (not -N) symbol resolution

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

Re: [PATCH 3/3 v2] src/readelf.c: Add support for print_debug_* output buffering

2025-06-06 Thread Mark Wielaard
r) > static void > print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, > unsigned int vers, unsigned int addrsize, unsigned int offset_size, > -struct Dwarf_CU *cu, Dwarf_Word len, const unsigned char *data) > +struct Dwarf_CU *cu, Dwarf_Word len, const unsigned char *data, > +FILE *out) > { > + if (out == NULL) > +out = stdout; > + Or here. I cannot find any invocation of print_ops with out being NULL. Everything else looks obviously correct. Thanks, Mark

Re: [PATCH v2] doc: Update elf_begin.3

2025-06-06 Thread Mark Wielaard
next here, but not ... > +.SH SEE ALSO > +.BR mmap (2), > +.BR elf_clone (3), > +.BR elf_end (3), > +.BR elf_rand (3), > +.BR libelf (3), > +.BR elf (5) ... here. Cheers, Mark

Re: [PATCH 2/3 v3] src/readelf.c: Support concurrency for -w, --debug-dump

2025-06-05 Thread Mark Wielaard
then > we must make sure to handle it before handling any other debug > section. Various other sections depend on the CU DIEs being > @@ -12239,15 +12375,24 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, > GElf_Ehdr *ehdr) > && strcmp (&name[14], debug_sections[n].name) == 0) > ) > { > - if ((print_debug_sections | implicit_debug_sections) > - & debug_sections[n].bitmask) > - debug_sections[n].fp (dwflmod, ebl, ehdr, scn, shdr, dbg); > + if (((print_debug_sections | implicit_debug_sections) > +& debug_sections[n].bitmask)) > + schedule_job (jdata, num_jobs++, debug_sections[n].fp, > + dwflmod, ebl, ehdr, scn, shdr, dbg); > + > + assert (num_jobs <= shnum); > break; > } > } > } > } OK. > +#ifdef USE_LOCKS > + /* If max_threads == 1, then jobs were immediately run in schedule_job. */ > + if (max_threads > 1) > +run_jobs (max_threads - 1); > +#endif > + >dwfl_end (skel_dwfl); >free (skel_name); Why max_threads - 1 ? Cheers, Mark

Re: [PATCH 1/3 v2] src: Add threadlib library for parallel job execution

2025-06-05 Thread Mark Wielaard
ef _THREADLIB_H > +#define _THREADLIB_H 1 > + > +/* Add a job to the job queue. When the job is run using run_job, it will > + consist of start_routine called with ARG as well as a FILE *. The > + contents of the FILE will be printed to stdout once start_routine > + finishes. */ > +extern void add_job (void *(*start_routine)(void *, FILE *), void *arg); > + > +/* Run all jobs that have been added by add_job. Jobs run concurrently > + using at most MAX_THREADS threads. > + > + run_jobs returns when all jobs have finished and any output from the > + jobs has been printed to stdout. Output from each job is printed in > + the order which jobs were added using add_job. */ > +extern void run_jobs (int max_threads); > + > +#endif /* threadlib.h */ Looks good. Maybe clarify add_job cannot be called after run_jobs has been called? Cheers, Mark

Re: [PATCH 1/3 v2] src: Add threadlib library for parallel job execution

2025-06-05 Thread Mark Wielaard
ead_output_stream (output_stream_t *stream) > +{ > + /* fclose may update stream->buf. */ > + if (fclose (stream->file) != 0) > +error (1, 0, _("cannot close thread output stream")); > + > + printf ("%s", stream->buf); > + free (stream->buf); > +} I think it would be slightly more efficient to use fwrite here. printf "%s" has to first look for the end of buf. And you do have the stream- >sizeloc already. Sorry for stopping the review here suddenly. Will continue later, but hopefully this is already helpful. Cheers, Mark

Re: [PATCH] doc: Update elf_begin.3

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

[COMMITTED] elfutils_debian_amd64_builder use elfutils_factory_mua

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

[Bug tools/33006] Stack Buffer Overflow in eu-objdump's riscv_disasm Function

2025-06-04 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=33006 Mark Wielaard changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED

[COMMITTED] unstrip: update unstripped_shnum when adding a new section

2025-06-03 Thread Mark Wielaard
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(+)

[Bug tools/33005] Dynamic Stack Buffer Overflow in eu-unstrip's new_shstrtab Function

2025-06-03 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=33005 Mark Wielaard changed: What|Removed |Added CC||mark at klomp dot org --- Comment #3

[Bug tools/33006] Stack Buffer Overflow in eu-objdump's riscv_disasm Function

2025-06-03 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=33006 Mark Wielaard changed: What|Removed |Added CC||mark at klomp dot org --- Comment #2

[COMMITTED] libcpu: riscv_disasm use 50 char mnebuf

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

[Bug tools/33004] Stack Buffer Underflow in eu-unstrip's sections_match Function

2025-06-02 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=33004 --- Comment #4 from Mark Wielaard --- (In reply to Xudong Cao from comment #3) > Thanks for the quick fix! > I agree the files are malformed, but any out-of-bounds access caught by ASan > is still considered a memory-safety defect

[Bug tools/33004] Stack Buffer Underflow in eu-unstrip's sections_match Function

2025-06-01 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=33004 Mark Wielaard changed: What|Removed |Added Resolution|--- |NOTABUG Status

[COMMITTED] unstrip: exit early if there are no sections in the stripped file

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

[Bug tools/33003] Bus Error Vulnerability in eu-strip due to Invalid Memory Write

2025-06-01 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=33003 Mark Wielaard changed: What|Removed |Added Resolution|--- |NOTABUG Status

[Bug tools/33003] Bus Error Vulnerability in eu-strip due to Invalid Memory Write

2025-06-01 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=33003 --- Comment #3 from Mark Wielaard --- (In reply to Sam James from comment #2) > (In reply to Mark Wielaard from comment #1) > > Sorry, I cannot replicate. > > > > Building with AddressSanitizer seems to

[Bug tools/33004] Stack Buffer Underflow in eu-unstrip's sections_match Function

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

[Bug tools/33003] Bus Error Vulnerability in eu-strip due to Invalid Memory Write

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

[PATCH] libdw: Make __libdw_fde_by_offset static in libdw/fde.c

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

Re: [PATCH v3] libdw: Fix eu_search_tree TOCTOU bugs

2025-05-30 Thread Mark Wielaard
inline functions and move to eu-search.h. > Simplify locking in is_constant_offset. > In __libdw_findcu use eu_tfind instead of eu_tfind_nolock. Thanks, this addresses all comments I had. I'll see if my suggestion to make __libdw_fde_by_offset static makes sense as a followup patch. Thanks, Mark

Re: [PATCH v2] libdw: Fix eu_search_tree TOCTOU bugs

2025-05-27 Thread Mark Wielaard
calling __libdw_intern_expression with Dwarf_CU members. */ > + mutex_define(, intern_lock); > + >/* Memory boundaries of this CU. */ >void *startp; >void *endp; Ack. > @@ -949,8 +953,9 @@ extern int __libdw_visit_scopes (unsigned int depth, >void *arg) >__nonnull_attribute__ (2, 4) internal_function; > > -/* Parse a DWARF Dwarf_Block into an array of Dwarf_Op's, > - and cache the result (via tsearch). */ > +/* Parse a DWARF Dwarf_Block into an array of Dwarf_Op's, and cache the > + result (via tsearch). The owner of CACHE (typically a Dwarf_CU or > + Dwarf_CFI_s) must hold a lock when calling this function. */ > extern int __libdw_intern_expression (Dwarf *dbg, > bool other_byte_order, > unsigned int address_size, Nice docks. > diff --git a/libdw/libdw_findcu.c b/libdw/libdw_findcu.c > index 0e4dcc37..21c8ed0e 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_nolock (&fake, tree, findcu_cb); >if (found != NULL) > { >mutex_unlock (dbg->dwarf_lock); OK, so the dwarf_lock has to be held to call __libdw_intern_next_unit below. But why is it correct to call eu_tfind_nolock here without holding the tree lock? Thanks, Mark

Re: [PATCH] backends/ppc_attrs.c: Add PPC long double tags

2025-05-27 Thread Mark Wielaard
ment so we can easily look them up in the future. Cheers, Mark > Signed-off-by: A. Wilcox > --- > backends/ppc_attrs.c | 12 > 1 file changed, 12 insertions(+) > > diff --git a/backends/ppc_attrs.c b/backends/ppc_attrs.c > index 48d7129d..6b00bccd 100644 &g

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

2025-05-20 Thread Mark Wielaard
This is actually v3, because I was nitpicking too much. But this version is perfect I have nothing to nitpick anymore. Thanks, Mark

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

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: [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 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 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 1/6] doc/Makefile.am: Sort manpages in alphabetical order

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

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] 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: [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

[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

[Bug libdw/32929] 0.193 regression: dwarf_srclang_check: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory

2025-05-02 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32929 Mark Wielaard changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution

[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

[Bug libdw/32929] 0.193 regression: dwarf_srclang_check: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory

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

[Bug general/32930] New: compile failure in i386_init.c asm/perf_regs.h: No such file or directory

2025-05-02 Thread mark at klomp dot org
: normal Priority: P2 Component: general Assignee: unassigned at sourceware dot org Reporter: mark at klomp dot org CC: elfutils-devel at sourceware dot org Target Milestone: --- elfutils 0.193 fails to build on debian hppa and m68k https

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 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 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 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

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] 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] 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

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

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: [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

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

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/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 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 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) > > &

  1   2   3   4   5   6   7   8   9   10   >