Re: PR30000 - introduce new srcfiles tool

2023-10-23 Thread Aaron Merey
Hi Housam, On Thu, Sep 28, 2023 at 11:00 AM Housam Alamour via Elfutils-devel wrote: > > Here is the new srcfiles tool ready for review. Thanks for working on this. I was not able to apply the patch from your email due to some line breaks that your email client may have inserted. `git format-p

Re: [PATCH] Fixed formatting of man page and --help options and added additional test case to ensure the correct source file is output.

2023-10-24 Thread Aaron Merey
On Tue, Oct 24, 2023 at 1:35 PM Housam Alamour wrote: > > Hello, > Here are the requested changes. Thanks Housam. I made a couple tweaks to the testcases, squashed this patch into "PR 3: debuginfod-find should have a source-list verb" and merged it into the main branch. Aaron

[PATCH] readelf: Support .gdb_index version 9

2023-10-31 Thread Aaron Merey
added in this patch uses an executable written with Fortran. This is because gdb does not currently populate the shortcut table of C/C++ programs (see sourceware PR30996). Signed-off-by: Aaron Merey --- src/readelf.c | 66 +++- tests/Makefile.am

[COMMITTED][PATCH] debuginfod-client.c: Don't print empty line in header_callback

2023-11-01 Thread Aaron Merey
debuginfod-find -vv debuginfo e2bbf033b548021c37866429f12a99bd33bd6e8d [...] header x-fedora-requestid: ZULLx0PPA8nmj8c8Hw-RtAACgAE header server: Apache header [...] Prevent this unnecessary line of output by only printing non-empty lines in header_callback. Signed

[COMMITTED][Bug libdw/30980] dwfl_offline_section_address: replace asserts with early return

2023-11-01 Thread Aaron Merey
return. https://sourceware.org/bugzilla/show_bug.cgi?id=30980 Signed-off-by: Aaron Merey --- libdwfl/offline.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libdwfl/offline.c b/libdwfl/offline.c index e090b42b..52539fe3 100644 --- a/libdwfl/offline.c +++ b/libdwfl

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

2023-11-01 Thread Aaron Merey
-s390x while > building elfutils. > > Full details are available at: > https://builder.sourceware.org/buildbot/#builders/43/builds/240 > > Build state: failed test (failure) > Revision: a34c5faad861efdd26d1c52b4f8d9d4077e03131 > Worker: fedora-s390x > Build Reason: (

Re: [PATCH] readelf: Support .gdb_index version 9

2023-11-02 Thread Aaron Merey
On Thu, Nov 2, 2023 at 10:20 AM Frank Ch. Eigler wrote: > > > BTW the description of the gdb_index at the top > > https://sourceware.org/gdb/current/onlinedocs/gdb/Index-Section-Format.html > > doesn't resolve anymore. It is now > > https://sourceware.org/gdb/current/onlinedocs/gdb.html/Index-Sect

[PATCH] libdwfl: Correctly handle corefile non-contiguous segments

2023-11-12 Thread Aaron Merey
Signed-off-by: Aaron Merey --- libdwfl/dwfl_segment_report_module.c | 37 +-- tests/Makefile.am| 5 +- tests/run-unstrip-noncontig.sh | 155 +++ tests/testcore-noncontig.bz2 | Bin 0 -> 49146091 bytes 4 files changed, 184 insertion

Re: [PATCH] libdwfl: Correctly handle corefile non-contiguous segments

2023-11-13 Thread Aaron Merey
BTW this patch won't apply as-is. I removed the firefox corefile since I'd rather not send a >50M email to this list :) See branch users/amerey/try-pr30975 if you want to run the code. Aaron On Sun, Nov 12, 2023 at 3:16 PM Aaron Merey wrote: > > It is possible for segments

Re: [PATCH] elfutils: PR 30991 srcfiles tarball feature

2023-11-13 Thread Aaron Merey
Hi Housam, Thanks for working on this. This is a useful feature that I can definitely see myself using! On Wed, Nov 8, 2023 at 11:49 AM Housam Alamour wrote: > > * srclines.cxx: Introduce new option that places all the > source files associated with a specified dwarf/elf file > into a zip file

Re: [PATCH] elfutils: PR 30991 srcfiles tarball feature

2023-11-14 Thread Aaron Merey
Hi Housam, On Mon, Nov 13, 2023 at 8:49 PM Aaron Merey wrote: > > On Wed, Nov 8, 2023 at 11:49 AM Housam Alamour wrote: > > +/* Read the file contents and write it to the zip file */ > > +fd = open(file_path.c_str(), O_RDONLY); > > +if (!fd) > > +

Re: [PATCH] libdwfl: Correctly handle corefile non-contiguous segments

2023-11-14 Thread Aaron Merey
Hi Mark, On Tue, Nov 14, 2023 at 9:03 AM Mark Wielaard wrote: > > > A couple caveats should be mentioned. First, start and end addresses > > of reported modules cannot be assumed to contain segments from only > > that module. This has always been the case however. > > There is dwfl_addrmodule/d

[PATCH v2] libdwfl: Correctly handle corefile non-contiguous segments

2023-11-17 Thread Aaron Merey
v1: https://sourceware.org/pipermail/elfutils-devel/2023q4/006644.html v2 changes: The size of the uncompressed testcore-noncontig has been reduced from 736M to 54K. dwfl_addrsegment tests have been added to verify correct handling of non-contiguous segments. --- libdwfl/dwfl_segment_report_mod

Re: [PATCH v2] libdwfl: Correctly handle corefile non-contiguous segments

2023-11-21 Thread Aaron Merey
Hi Mark, On Tue, Nov 21, 2023 at 7:48 AM Mark Wielaard wrote: > > > > The size of the uncompressed testcore-noncontig has been reduced from > > 736M to 54K. > > Uncompressed it is 580K. Still a bit large, but much more reasonable. > We even have a couple of larger test files in the repo. Thanks.

[PATCH 1/2] libdw: Use INTUSE with dwarf_get_units

2023-12-06 Thread Aaron Merey
Add INTDECL for dwarf_get_units and call dwarf_get_units with INTUSE. Signed-off-by: Aaron Merey --- libdw/dwarf_get_units.c | 1 + libdw/dwarf_next_lines.c | 8 +-- libdw/libdwP.h| 91 +-- libdw/libdw_find_split_unit.c | 4 +- 4

[PATCH 0/2] dwarf_getaranges: Build aranges list from CUs

2023-12-06 Thread Aaron Merey
Patch 1/2 is a prepatory patch that modifies dwarf_get_units calls with INTUSE. Aaron Merey (2): libdw: Use INTUSE with dwarf_get_units dwarf_getaranges: Build aranges list from CUs instead of .debug_aranges libdw/dwarf_get_units.c | 1 + libdw/dwarf_getaranges.c | 215

[PATCH 2/2] dwarf_getaranges: Build aranges list from CUs instead of .debug_aranges

2023-12-06 Thread Aaron Merey
Signed-off-by: Aaron Merey --- This patch's method of building the aranges list is slower than simply reading .debug_aranges. On my machine, running eu-stack on a 2.9G firefox core file takes about 8.7 seconds with this patch applied, compared to about 3.3 seconds without this patch. Ideal

[PATCH v2] dwarf_getaranges: Build aranges list from CUs instead of .debug_aranges

2023-12-11 Thread Aaron Merey
Signed-off-by: Aaron Merey --- v2 adds a test for generating aranges from a binary with no .debug_aranges. This patch's method of building the aranges list is slower than simply reading .debug_aranges. On my machine, running eu-stack on a 2.9G firefox core file takes about 8.7 seconds with

Re: [PATCH 1/2] libdw: Use INTUSE with dwarf_get_units

2023-12-22 Thread Aaron Merey
On Thu, Dec 21, 2023 at 6:56 PM Mark Wielaard wrote: > > On Wed, Dec 06, 2023 at 08:35:03PM -0500, Aaron Merey wrote: > > Add INTDECL for dwarf_get_units and call dwarf_get_units with INTUSE. > > This is obviously OK. Although it is a bit of a micro-optimization. Thanks

Re: [PATCH] PR 30991: srcfiles tarball feature

2024-01-22 Thread Aaron Merey
Hi Housam, This is a very cool feature. Thanks again for working on this! On Fri, Jan 19, 2024 at 11:47 AM Housam Alamour wrote: > > * srcfiles.cxx: Introduce new --zip option that places all the > source files associated with a specified dwarf/elf file > into a zip file and sends it to

Re: [PATCH] libdwfl: Remove asserts from library code

2024-01-28 Thread Aaron Merey
Hi Di, Thanks for the patch. On Sun, Dec 24, 2023 at 2:35 AM Di Chen wrote: > > From 33d436aefb6b63a159943bd24eb432b8cfb8b369 Mon Sep 17 00:00:00 2001 > From: Di Chen > Date: Sun, 24 Dec 2023 11:44:48 +0800 > Subject: [PATCH] libdwfl: Remove asserts from library code > > It would be better for

Re: [PATCH] srcfiles.cxx: Addressed all patch review notes. typos, formatting, documentation, show -z and -b option even if libarchive is not available (and adjust test script accordingly), show sourc

2024-01-29 Thread Aaron Merey
Hi Housam, On Fri, Jan 26, 2024 at 4:01 PM Housam Alamour wrote: > > +/* Definitions of arguments for argp functions. */ > static const struct argp_option options[] = > { >{ NULL, 0, NULL, OPTION_DOC, N_("Output options:"), 1 }, > @@ -89,58 +89,50 @@ static const struct argp_option options

[PATCH] unstrip: Call adjust_relocs no more than once per section.

2024-02-05 Thread Aaron Merey
nd time on a section during add_new_section_symbols. However since add_new_section_symbols generates its own distinct symbol index map, this should not trigger the bug described above. https://sourceware.org/bugzilla/show_bug.cgi?id=31097 Signed-off-by: Aaron Merey --- I added some tests to r

Re: [PATCH] PR 30991: srcfiles tarball feature

2024-02-05 Thread Aaron Merey
Thanks Housam, pushed as commit 75fb8c0152. Aaron On Fri, Feb 2, 2024 at 10:51 AM Housam Alamour wrote: > > * srcfiles.cxx: Introduce new --zip option that places all the > source files associated with a specified dwarf/elf file > into a zip file and sends it to stdout. Files may be >

Re: [PATCH] unstrip: Call adjust_relocs no more than once per section.

2024-02-06 Thread Aaron Merey
Hi Mark, On Tue, Feb 6, 2024 at 10:36 AM Mark Wielaard wrote: > > So it looks like elfcmp explicitly checks ebl_section_strip_p and > doesn't compare sections that are strippable. Maybe we should add an > eu-elfcmp --all-sections flag? > > We should probably also check that it handles the new SHT

[PATCH] Handle DW_AT_decl_file 0

2024-02-09 Thread Aaron Merey
versions which exclusively use DW_AT_decl_file 0 to indicate that no source file is specified, dwarf_decl_file will now return the name "???" if called on a DIE with DW_AT_decl_file 0. https://sourceware.org/bugzilla/show_bug.cgi?id=3 Signed-off-by: Aaron Merey --- libdw/dwarf_d

Re: [PATCH] Handle DW_AT_decl_file 0

2024-02-12 Thread Aaron Merey
Hi Mark, On Mon, Feb 12, 2024 at 12:31 PM Mark Wielaard wrote: > >(void) INTUSE(dwarf_getsrclines) (&CUDIE (cu), &lines, &nlines); > > - assert (cu->lines != NULL); > > } > > I see why would like to get rid of asserts in the code base. > But I believe the assert is valid. dwarf_

Re: [PATCH] Handle DW_AT_decl_file 0

2024-02-12 Thread Aaron Merey
Hi Mark, On Mon, Feb 12, 2024 at 4:14 PM Mark Wielaard wrote: > > On Mon, Feb 12, 2024 at 01:16:30PM -0500, Aaron Merey wrote: > > On Mon, Feb 12, 2024 at 12:31 PM Mark Wielaard wrote: > > > >(void) INTUSE(dwarf_getsrclines) (&CUDIE (cu), &lines, &am

Preparing for the 0.191 release on Friday March 1

2024-02-14 Thread Aaron Merey
Hi everyone, We are planning to do the 0.191 release on Friday March 1. Since the 0.190 release last November, there have been 31 commits. Among these are some important bug fixes and new features. If your patch is still under review [1] or you have other patches you'd like merged before the rel

Re: [PATCH v2] dwarf_getaranges: Build aranges list from CUs instead of .debug_aranges

2024-02-19 Thread Aaron Merey
Hi Mark, On Tue, Feb 13, 2024 at 8:28 AM Mark Wielaard wrote: > > > This patch's method of building the aranges list is slower than simply > > reading .debug_aranges. On my machine, running eu-stack on a 2.9G > > firefox core file takes about 8.7 seconds with this patch applied, > > compared to

Re: [PATCH v2] dwarf_getaranges: Build aranges list from CUs instead of .debug_aranges

2024-02-21 Thread Aaron Merey
Hi Mark, On Tue, Feb 20, 2024 at 5:23 PM Mark Wielaard wrote: > > > As for the number of aranges found, there is a difference for libxul.so: > > 250435 with the patch compared to 254832 without. So 4397 fewer aranges > > are found when using the new CU iteration method. I'll dig into this and >

Re: [PATCH v2] dwarf_getaranges: Build aranges list from CUs instead of .debug_aranges

2024-02-22 Thread Aaron Merey
Hi Frank, On Thu, Feb 22, 2024 at 10:35 AM Frank Ch. Eigler wrote: > > > > We could then also introduce a new public function, dwarf_getdieranges > > > (?) that does the new thing. But it doesn't have to be public on the > > > first try as long as dwarf_addrdie and dwfl_module_addrdie work. (We >

[PATCH] Add __libdw_getdieranges

2024-02-26 Thread Aaron Merey
=22288 https://sourceware.org/bugzilla/show_bug.cgi?id=30948 Signed-off-by: Aaron Merey --- Once this function's interface is refined it can be added to the public libdw API. We might add some form of lazy loading, for example. I mentioned [1] that there are some clang-compiled shared libr

[PATCH v2] Add __libdw_getdieranges

2024-02-27 Thread Aaron Merey
-by: Aaron Merey --- v2 addresses feedback from Mark's review: https://sourceware.org/pipermail/elfutils-devel/2024q1/006853.html Avoid calling free on arangelist when it's possibly corrupt. Run tests in run-getsrc-die.sh twice, once with .debug_aranges present in the testfile and onc

[COMMITTED] tests/run-getsrc-die.sh: Skip tests if objcopy fails

2024-02-29 Thread Aaron Merey
run-getsrc-die.sh uses objcopy to remove .debug_aranges from testfiles. Depending how objcopy is built, it may fail to recognize the format of the testfiles. Skip the remaining tests if objcopy fails. Signed-off-by: Aaron Merey --- tests/run-getsrc-die.sh | 36

elfutils 0.191 released

2024-03-01 Thread Aaron Merey
n now fetch the source files of a DWARF/ELF file and place them into a zip. * GIT SHORTLOG * Aaron Merey (9): libdwfl: Correctly handle corefile non-contiguous segments libdw: Use INTUSE with dwarf_get_units debuginfod.cxx: Restore comment Revert "debuginfod.

Re: [PATCH] Getter and setter for Dwfl's offline_next_address

2024-03-15 Thread Aaron Merey
Hi Martin, On Wed, Mar 6, 2024 at 2:23 PM Martin Rodriguez Reboredo wrote: > > diff --git a/tests/dwfl-offline-address.c b/tests/dwfl-offline-address.c > new file mode 100644 > index ..9a33b95a > --- /dev/null > +++ b/tests/dwfl-offline-address.c > @@ -0,0 +1,43 @@ > +#include > +#includ

Re: [PATCH] riscv: Partial implementation of flatten_aggregate

2024-03-20 Thread Aaron Merey
Hi Mark, On Wed, Mar 20, 2024 at 11:03 AM Mark Wielaard wrote: > > dwfl_module_return_value_location would fail on riscv for functions > which return a (small) struct. This patch implements the simplest > cases of flatten_aggregate in backends/riscv_retval.c. It just handles > structs containing

[PATCH] config/profile.fish.in: Prevent bracketed variables and unmatched wildcard errors

2024-03-26 Thread Aaron Merey
using the set command instead of cat to prevent an unmatched wildcard error when no .urls files are found. Signed-off-by: Aaron Merey --- config/Makefile.am | 1 + config/profile.fish.in | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/Makefile.am b/config/Makefile.am

Elfutils Code of Conduct

2024-03-28 Thread Aaron Merey
ted to the elfutils code of conduct committee at elfutils-cond...@sourceware.org. The current members of the elfutils code of conduct committee are: Mark Wielaard Aaron Merey All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the p

[PATCH] libdw: dwarf_getsrcfiles should not imply dwarf_getsrclines

2024-03-28 Thread Aaron Merey
/show_bug.cgi?id=27405 Signed-off-by: Aaron Merey --- libdw/dwarf_getsrcfiles.c | 24 +- libdw/dwarf_getsrclines.c | 506 ++-- libdw/dwarf_macro_getsrcfiles.c | 4 +- libdw/libdwP.h | 10 + tests/get-files.c | 8 + tests/get

[PATCH] libdw: dwarf_getsrcfiles should not imply dwarf_getsrclines

2024-04-09 Thread Aaron Merey
gi?id=27405 Signed-off-by: Aaron Merey --- v2 changes: Restored support for DW_LNE_define_file. Added DW_LNE_define_file testcase and testfile. Added new function get_lines_or_files which is based on the old __libdw_getsrclines. __libdw_getsrclines and __libdw_getsrcfiles now call get_lines_or_

Re: [PATCH] libdw: dwarf_getsrcfiles should not imply dwarf_getsrclines

2024-04-10 Thread Aaron Merey
Hi Mark, On Wed, Apr 10, 2024 at 3:48 PM Mark Wielaard wrote: > > v2 changes: > > Restored support for DW_LNE_define_file. > > Great. And sorry I first suggested to just drop it and then said I > would like it back. This was more work than I though. No problem, better if we support this just in

Re: [PATCH] libdw: dwarf_getsrcfiles should not imply dwarf_getsrclines

2024-04-11 Thread Aaron Merey
On Thu, Apr 11, 2024 at 5:55 AM Mark Wielaard wrote: > > All looks good BTW. Please do push (if possible with the above change). Thanks Mark, pushed as commit d4b0848be5f575ff9464fee12ce7be416e4fb392 Aaron

[COMMITTED] tests/.gitignore: Use correct spelling for get-files-define-file

2024-04-17 Thread Aaron Merey
Replace get-files-define_file with get-files-define-file. Signed-off-by: Aaron Merey --- tests/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/.gitignore b/tests/.gitignore index 4937f0d1..30f5800b 100644 --- a/tests/.gitignore +++ b/tests/.gitignore

Re: [PATCH] config/profile.fish.in: Prevent bracketed variables and unmatched wildcard errors

2024-04-17 Thread Aaron Merey
On Wed, Mar 27, 2024 at 10:06 AM Mark Wielaard wrote: > > Not knowing fish this looks OK to me. We might want a testcase like > the one that was just added for config/profile.sh to make sure we ship > something that runs correctly. Could be something as simple as: > > type fish 2>/dev/null || (e

[PATCH] Fix 'make coverage' when used with lcov version 2.0+

2024-05-06 Thread Aaron Merey
ils-htdocs/update-coverage.sh with lcov 1.14 and 2.0. Signed-off-by: Aaron Merey --- Makefile.am | 30 +- configure.ac | 4 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index c9d59d4a..a1f0b0c3 100644 --- a/Makefil

Re: [PATCH] Fix 'make coverage' when used with lcov version 2.0+

2024-05-08 Thread Aaron Merey
On Mon, May 6, 2024 at 4:45 PM Aaron Merey wrote: > > Starting with version 2.0, various lcov warnings now trigger an error > exit. This results in 'make coverage' terminating before completion. > > Fix this by invoking lcov and genhtml with --ignore-errors to prev

Re: [rfc] [patch] PR28204: debuginfod ima signature verification

2024-05-09 Thread Aaron Merey
Hi Frank, I've pointed out a couple nits below, but otherwise the patch LGTM. I've also attached a diff for handling DEBUGINFOD_IMA_CERT_PATH in profile.fish.in that should apply on top of this patch. I know there's already been a lot of discussion re. ima:permissive and I'm weighing in rather la

[COMMITTED] Makefile.am: Avoid code duplication

2024-05-09 Thread Aaron Merey
On Thu, May 9, 2024 at 6:59 PM Dmitry V. Levin wrote: > > On Thu, May 09, 2024 at 06:08:05PM -0400, Frank Ch. Eigler wrote: > > Hi - > > > > On Fri, May 10, 2024 at 12:53:39AM +0300, Dmitry V. Levin wrote: > > > > Pushed as commit ca8ad4648197 > > > > > > What's the purpose of sending proposed pat

Re: [PATCH] ar: Replace one alloca use by xmalloc

2024-05-10 Thread Aaron Merey
Hi Mark, On Tue, Apr 30, 2024 at 10:39 AM Mark Wielaard wrote: > > This alloca use is inside a lexical block and is used to replace one > element of argv. Use a function local variable, xmalloc and free to > make memory usage pattern more clear. > > * src/ar.c (main): Move newp char pointer d

[COMMITTED] config/Makefile.am: Modify profile.fish in all-local

2024-05-10 Thread Aaron Merey
before make install. Fix this by removing the brackets in all-local instead of install-data-local. Signed-off-by: Aaron Merey --- config/Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/Makefile.am b/config/Makefile.am index e42aacee..2dcbe94e 100644 --- a

[PATCH] Update code of conduct

2024-05-28 Thread Aaron Merey
Adopt a new code of conduct based on the Contributor's Covenant. See the new CONDUCT file for more information. Signed-off-by: Aaron Merey --- CONDUCT | 134 CONTRIBUTING| 3 +- Makefile.am | 2 +-

Re: [patch] debuginfod metadata extension

2024-06-03 Thread Aaron Merey
Hi Frank, LGTM, please go ahead and merge the patch with these changes. Aaron On Sat, Jun 1, 2024 at 11:26 AM Frank Ch. Eigler wrote: > > Hi - > > > Thanks for the patch, some suggestions below. > > Thanks, adding the following 'git diff -w' to the patch you reviewed: > > > [...] > > I was expe

Re: [PATCH] Update code of conduct

2024-06-07 Thread Aaron Merey
Pushed as commit e2a3e51ab54c4698fe09 Aaron On Tue, May 28, 2024 at 3:34 PM Aaron Merey wrote: > > Adopt a new code of conduct based on the Contributor's Covenant. > > See the new CONDUCT file for more information. > > Signed-off-by: Aaron Merey > --- >

[PATCH] Add man pages for some libelf functions

2024-06-13 Thread Aaron Merey
2001 From: Aaron Merey Date: Thu, 13 Jun 2024 15:20:03 -0400 Subject: [PATCH] Add man pages for some libelf functions Add man pages for elf32_getehdr.3, elf64_getehdr.3, elf_errmsg.3, elf_errno.3 and elf_version.3 Signed-off-by: Aaron Merey --- doc/Makefile.am | 6 +- doc/elf32_gete

Re: [PATCH] Add man pages for some libelf functions

2024-06-19 Thread Aaron Merey
Hi Frank, On Wed, Jun 19, 2024 at 11:52 AM Frank Ch. Eigler wrote: > > By the way, in addition or instead of using tarballs for carrying this > bulk content toward review, a git branch holding it all work about as > well. I've created the branch users/amerey/manpages for holding this work. It co

Re: [PATCH] Add man pages for some libelf functions

2024-06-26 Thread Aaron Merey
Add man pages for elf32_getehdr.3, elf64_getehdr.3, elf_errmsg.3, elf_errno.3 and elf_version.3 Signed-off-by: Aaron Merey --- Hi Mark, On Fri, Jun 21, 2024 at 9:28 AM Mark Wielaard wrote: > On Thu, 2024-06-13 at 16:01 -0400, Aaron Merey wrote: > > I've attached a patch that

Re: [PATCH] Add man pages for some libelf functions

2024-06-28 Thread Aaron Merey
Hi Mark, On Fri, Jun 28, 2024 at 7:36 AM Mark Wielaard wrote: > On Wed, 2024-06-26 at 20:22 -0400, Aaron Merey wrote: > > > > > > In general I wonder how useful the description text generated by > > > chatgtp is. It looks very generic and I am a little worried it s

[COMMITTED] elfutils.spec.in: Package elf32_* and elf64_* man pages

2024-06-28 Thread Aaron Merey
Previously only elf_* man pages were included during rpmbuild. Signed-off-by: Aaron Merey --- config/elfutils.spec.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in index 5bb4a722..0d1ec11b 100644 --- a/config/elfutils.spec.in +++ b

Re: [PATCH 1/2] libdwfl: specify optional sysroot to search for shared libraries and binaries

2024-07-04 Thread Aaron Merey
Hi Michal, On Tue, Jul 2, 2024 at 1:34 PM Michal Sekletar wrote: > > I've sent out v2 where I tried to incorporate the feedback. Also I've added a > test case. Thanks for adding the test case. The patches LGTM and I've pushed all three. I made a few trivial changes to indentation and to preve

[COMMITTED] tests/Makefile.am: Add run-sysroot.sh to EXTRA_DIST

2024-07-04 Thread Aaron Merey
Signed-off-by: Aaron Merey --- tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index d5b2c02b..77f9b90d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -669,7 +669,7 @@ EXTRA_DIST = run-arextract.sh run

Re: [PATCH v2 3/3] tests: add test for eu-stack --sysroot

2024-07-10 Thread Aaron Merey
Hi Ying, On Wed, Jul 10, 2024 at 4:33 AM Ying Huang wrote: > > Hi, > > I did test on mips64el and x86_64, the test results all were failed as > follows: > > 1. x86-64: > > $ uname -a > Linux swecovm-s01 6.1.0-17-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.69-1 > (2023-12-30) x86_64 GNU/Linux > > $

[COMMITTED] tests/run-sysroot.sh: Avoid testing output that depends on LZMA support

2024-07-11 Thread Aaron Merey
not, then the symbol names will be absent from the backtrace. Test the eu-stack output with these 2 frames removed in order to prevent a test failure when LZMA support is missing. Signed-off-by: Aaron Merey --- tests/run-sysroot.sh | 11 ++- 1 file changed, 6 insertions(+), 5 deletions

[COMMITTED] tests/run-sysroot.sh: Delete file with tempfiles

2024-07-11 Thread Aaron Merey
Signed-off-by: Aaron Merey --- tests/run-sysroot.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/run-sysroot.sh b/tests/run-sysroot.sh index cfdc51e9..0bbd1aa4 100755 --- a/tests/run-sysroot.sh +++ b/tests/run-sysroot.sh @@ -31,6 +31,8 @@ testrun "${abs_top_builddir}"

Re: [PATCH v2 3/3] tests: add test for eu-stack --sysroot

2024-07-12 Thread Aaron Merey
Hi Ying, On Wed, Jul 10, 2024 at 2:06 PM Aaron Merey wrote: > > On Wed, Jul 10, 2024 at 4:33 AM Ying Huang > wrote: > > > > + testrun diff /tmp/tmp.bCCbATKu43/stack.out - > > + built_testrun diff /tmp/tmp.bCCbATKu43/stack.out - > > + > > LD_LIBRARY_PATH=

Re: [PATCH v2 3/3] tests: add test for eu-stack --sysroot

2024-07-12 Thread Aaron Merey
On Fri, Jul 12, 2024 at 11:38 AM Aaron Merey wrote: > > I did some testing on Debian 6.1.94-1 (2024-06-21) x86_64. LZMA/xz wasn't > pre-installed and I was able to reproduce the test failure. Sorry I should say that no LZMA-support dev package was pre-installed. xz itself is preinstalled. Aaron

[PATCH 0/9 v2] Fix thread-safety for elfutils

2024-07-17 Thread Aaron Merey
v1 can be found at https://sourceware.org/pipermail/elfutils-devel/2023q3/006329.html Heather McIntyre is the original author of v1 of these patches. Heather and myself co-wrote v2. Aaron Merey (9): libelf: Fix deadlock in __libelf_readall libelf: Fix deadlock in elf_cntl lib: Add

[PATCH 2/9 v2] libelf: Fix deadlock in elf_cntl

2024-07-17 Thread Aaron Merey
From: Heather McIntyre * libelf/elf_cntl.c (elf_cntl): Move rwlock_wrlock, rwlock_unlock, inside case switch statements. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- v2 changes: Remove unnecessary locking and checking of elf

[PATCH 1/9 v2] libelf: Fix deadlock in __libelf_readall

2024-07-17 Thread Aaron Merey
From: Heather McIntyre Apply locking during __libelf_readall. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- v2 changes: Add locking for all early returns in __libelf_readall. libelf_{acquire,release}_all have been renamed to libelf_{acquire

[PATCH 4/9 v2] libdw: make dwarf_getalt thread-safe

2024-07-17 Thread Aaron Merey
From: Heather McIntyre * libdw/dwarf_getalt.c (dwarf_getalt): Add locking. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard v2 changes: Write lock now applies to all of dwarf_getalt. --- libdw/dwarf_getalt.c | 18 -- 1 file

[PATCH 6/9 v2] libdw: Make libdw_find_split_unit thread-safe

2024-07-17 Thread Aaron Merey
From: Heather McIntyre * (__libdw_find_split_unit): Add lock for cu->split. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- v2 changes: Locking applied to __libdw_find_split_unit instead of try_split_file. li

[PATCH 5/9 v2] libdwP.h: Add locking to __libdw_dieabbrev,

2024-07-17 Thread Aaron Merey
From: Heather McIntyre Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- v2 changes: This replaces patch "libdw: Add locking around __libdw_dieabbrev for dwarf_hasattr". Mark suggested that we remove lazy abbrev reading in order to si

[PATCH 8/9 v2] tests: Add eu-search tests

2024-07-17 Thread Aaron Merey
. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- v2 changes: Rebase and add run-eu-search-tests.sh to EXTRA_DIST. The elfutils testsuite (including the tests added in this patch) passes for me on the sourceware buildbots. However the buildbots do

[PATCH 3/9 v2] lib: Add eu_tsearch, eu_tfind, eu_tdelete and eu_tdestroy

2024-07-17 Thread Aaron Merey
that the rwlock_* macros can be included in libdwP.h without having to also include the rest of eu-config.h. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard v2 changes: This patch replaces v1 03/16 and 14/16. --- lib/Makefile.am | 5

[PATCH 7/9 v2] libdw: Make libdw_findcu thread-safe

2024-07-17 Thread Aaron Merey
From: Heather McIntyre * libdw/libdw_findcu.c (__libdw_findcu): Use eu_tfind and dwarf_lock (__libdw_intern_next_unit): Use per-Dwarf_CU locks. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- v2 changes: Use per-Dwarf_CU

[PATCH 9/9 v2] configure: No longer mark --enable-thread-safety as EXPERIMENTAL

2024-07-17 Thread Aaron Merey
From: Heather McIntyre * configure.ac (--enable-thread-safety): Remove experimental warning. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- No changes in v2. However PR31967 (datarace in elf_compress[_gnu]) was recently filed

Re: [PATCH 0/9 v2] Fix thread-safety for elfutils

2024-07-18 Thread Aaron Merey
Hi Milian, On Thu, Jul 18, 2024 at 6:14 AM Milian Wolff wrote: > > On Donnerstag, 18. Juli 2024 00:33:59 MESZ Aaron Merey wrote: > > v1 can be found at > > https://sourceware.org/pipermail/elfutils-devel/2023q3/006329.html > > > > Heather McIntyre is the original

[PATCH] Add man pages for some libelf functions

2024-07-18 Thread Aaron Merey
Add man pages for elf32_offscn.3, elf64_offscn.3, elf_getscn.3 and elf_ndxscn.3. Signed-off-by: Aaron Merey --- doc/elf32_offscn.3 | 61 + doc/elf64_offscn.3 | 62 ++ doc/elf_getscn.3 | 55

[PATCH] Add man pages for some libelf functions

2024-07-18 Thread Aaron Merey
Add man pages for elf32_offscn.3, elf64_offscn.3, elf_getscn.3 and elf_ndxscn.3. Signed-off-by: Aaron Merey --- Reposting this patch with the new man pages added to doc/Makefile.am. doc/Makefile.am| 6 - doc/elf32_offscn.3 | 61 + doc

Re: [PATCH v4 0/7] debuginfod: speed up extraction from kernel debuginfo packages by 200x

2024-07-23 Thread Aaron Merey
Hi Omar, On Fri, Jul 19, 2024 at 2:24 PM Omar Sandoval wrote: > > From: Omar Sandoval > > This is v4 of my patch series optimizing debuginfod for kernel > debuginfo. v1 is here [1], v2 is here [2], v3 is here [3]. The only > changes from v3 in this version are fixing a bogus maybe-uninitialize

Re: [PATCH] Add man pages for some libelf functions

2024-07-24 Thread Aaron Merey
Hi Mark, On Sun, Jul 21, 2024 at 6:15 PM Mark Wielaard wrote: > > Hi Aaron, > > Some small comments below. > > On Thu, Jul 18, 2024 at 10:03:02PM -0400, Aaron Merey wrote: > > Add man pages for elf32_offscn.3, elf64_offscn.3, elf_getscn.3 and > > elf_ndxscn.3. >

Re: [PATCH v5 0/7] debuginfod: speed up extraction from kernel debuginfo packages by 200x

2024-07-24 Thread Aaron Merey
On Tue, Jul 23, 2024 at 6:40 PM Omar Sandoval wrote: > > From: Omar Sandoval > > This is v4 of my patch series optimizing debuginfod for kernel > debuginfo. v1 is here [1], v2 is here [2], v3 is here [3], v4 is here > [4]. The only change from v4 in this version is adding --fdcache-mbs > and --

[PATCH 01/10 v3] libelf: Fix deadlock in __libelf_readall

2024-08-02 Thread Aaron Merey
From: Heather McIntyre Apply locking during __libelf_readall. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- v3 changes: Update comments and change order or child lock aquisition. libelf/common.h | 24 ++-- libelf

[PATCH 02/10 v3] libelf: Fix deadlock in elf_cntl

2024-08-02 Thread Aaron Merey
From: Heather McIntyre * libelf/elf_cntl.c (elf_cntl): Move rwlock_wrlock, rwlock_unlock, inside case switch statements. Remove unnecessary early return. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- v3 changes: Remove

[PATCH 03/10 v3] lib: Add eu_tsearch, eu_tfind, eu_tdelete and eu_tdestroy

2024-08-02 Thread Aaron Merey
function with eu-search equivalent. * elf_getdata_rawchunck.c: Ditto. * libelfP.h (struct Elf): Replace void * rawchuncks memeber with search_tree rawchunk_tree. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- v3

[PATCH 04/10 v3] libdw: Add rwlocks for Dwarf and Dwarf_CU

2024-08-02 Thread Aaron Merey
): Define dwarf_lock. (struct Dwarf_CU): Define abbrev_lock. * libdw/libdw_findcu.c (__libdw_intern_next_unit): Init abbrev_lock. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey --- v3 changes: New patch added in v3 that contains rwlock changes previously in

[PATCH 05/10 v3] libdw: make dwarf_getalt and dwarf_setalt thread-safe

2024-08-02 Thread Aaron Merey
From: Heather McIntyre * libdw/dwarf_getalt.c (dwarf_getalt): Add locking. * libdw/dwarf_setalt.c (dwarf_setalt): Ditto. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- v3 changes: Check for NULL argument before acquiring lock

[PATCH 06/10 v3] libdwP.h: Add locking to dwarf_formref_die and __libdw_dieabbrev

2024-08-02 Thread Aaron Merey
From: Heather McIntyre * libdw/dwarf_formref_die.c (dwarf_formref_die): Add locking around call to __libdw_intern_next_unit. * libdw/libdwP.h (__libdw_dieabbrev): Add locking. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard

[PATCH 07/10 v3] libdw: Make libdw_find_split_unit thread-safe

2024-08-02 Thread Aaron Merey
From: Heather McIntyre * libdw/libdwP.h (struct Dwarf_CU): Add split_lock. * libdw/libdw_find_split_unit.c (__libdw_find_split_unit): Add locking. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- v3 changes: Move Dwarf

[PATCH 08/10 v3] libdw: Make libdw_findcu thread-safe

2024-08-02 Thread Aaron Merey
From: Heather McIntyre * libdw/libdw_findcu.c (__libdw_findcu): Add locking. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- v3 changes: Fix indentation and move rwlock_init calls to other patches in this series. libdw/libdw_findcu.c

[PATCH 10/10 v3] configure: No longer mark --enable-thread-safety as EXPERIMENTAL

2024-08-02 Thread Aaron Merey
From: Heather McIntyre * configure.ac (--enable-thread-safety): Remove experimental warning. Signed-off-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- No changes between v2 and v3. PR31967 (datarace in elf_compress[_gnu]) was recently

[PATCH 09/10 v3] tests: Add eu-search tests

2024-08-02 Thread Aaron Merey
-by: Heather S. McIntyre Signed-off-by: Aaron Merey Signed-off-by: Mark Wielaard --- No changes between v2 and v3. The elfutils testsuite (including the tests added in this patch) passes for me on the sourceware buildbots. However the buildbots do not configure elfutils with --enable-thread

Re: [PATCH] Prevent binaries in src from colliding with libc++ headers

2024-08-07 Thread Aaron Merey
Hi Tristan, Thanks for the patch, some comments below. > From 11f000782c16f05f81a15d4dba75deb082ab97e1 Mon Sep 17 00:00:00 2001 > From: Tristan Ross > Date: Tue, 30 Jul 2024 21:03:03 -0700 > Subject: [PATCH] Prevent binaries in src from colliding with libc++ headers > > Discovered with Nix and L

Re: [PATCH] backends/riscv: Remove unused relocations

2024-08-07 Thread Aaron Merey
On Wed, Jul 31, 2024 at 9:03 AM Andreas Schwab wrote: > > None of these relocations were ever part of any object file. The > GNU_VTINHERIT and GNU_VTINHERIT relocations were part of the obsolete > --gc-sections support which was never implemented for RISC-V. The other > relocations are only used

Re: [PATCH] Prevent binaries in src from colliding with libc++ headers

2024-08-08 Thread Aaron Merey
From: Tristan Ross Hi Tristan On Wed, Aug 7, 2024 at 5:07 PM Tristan ross wrote: > > Gotcha on that ChangeLog thing. With the warning, I think we can just > use `?=` in `config/eu.am` for `AM_CPPFLAGS`. I tried this but I still got an error during autoreconf. I tweaked your patch below so tha

Re: [PATCH] Prevent binaries in src from colliding with libc++ headers

2024-08-08 Thread Aaron Merey
Hi Tristan, On Thu, Aug 8, 2024 at 2:19 PM Aaron Merey wrote: > On Wed, Aug 7, 2024 at 5:07 PM Tristan ross wrote: > > > > Gotcha on that ChangeLog thing. With the warning, I think we can just > > use `?=` in `config/eu.am` for `AM_CPPFLAGS`. > > I tried this but

Re: [PATCH] Prevent binaries in src from colliding with libc++ headers

2024-08-09 Thread Aaron Merey
Hi Tristan, (elfutils-devel CC'ed) On Thu, Aug 8, 2024 at 6:09 PM Tristan ross wrote: > > > Can you also provide a reproducer for the error you are seeing? > > I think this can be reproduced if you build elfutils with Clang and Clang is > using libc++ (LLVM's C++ implementation). Build with lik

Re: [PATCH] Prevent binaries in src from colliding with libc++ headers

2024-08-09 Thread Aaron Merey
(elfutils-devel CC'ed) On Fri, Aug 9, 2024 at 10:32 AM Tristan ross wrote: > > The Gentoo patch looks essentially the same as what we started with which > might bring that warning back. It also uses `-iquote .` but from what I've > seen, no files in src import with quotes. But that patch will w

Re: [PATCH] Prevent binaries in src from colliding with libc++ headers

2024-08-14 Thread Aaron Merey
Hi Tristan, On Fri, Aug 9, 2024 at 10:43 AM Tristan ross wrote: > > Well, that's great. Probably should use it instead since it's simpler. > > 日付:Fri, 09 Aug 2024 07:38:05 -0700 差出人:ame...@redhat.com > > (elfutils-devel CC'ed) > > On Fri, Aug 9, 2024 at 10:32 AM Tristan ross > wrote:

  1   2   3   4   >