Re: [PATCH 1/1] support cross compilation

2022-12-21 Thread Mark Wielaard
;t problems with building it "directly from VCS" > too, > as you see. Nevertheless there are opinion that code from VCS > could be smoothly building without procedures behind scene. Isn't it simpler to first do a local make dist and then build cross from that? Cheers, Mark

Re: ☠ Buildbot (GNU Toolchain): elfutils-try-debian-armhf - failed compile (failure) (users/marxin/try-zstd-support-v2)

2022-12-21 Thread Mark Wielaard
t; - property changes: > > https://builder.sourceware.org/buildbot/#builders/201/builds/47/steps/5/logs/property_changes > > > > - 6: make ( failure ) > > Logs: > > - stdio: > > https://builder.sourceware.org/buildbot/#bu

Re: ☠ Buildbot (GNU Toolchain): elfutils-try-debian-armhf - failed compile (failure) (users/marxin/try-zstd-support-v2)

2022-12-21 Thread Mark Wielaard
Hi, On Wed, 2022-12-21 at 15:42 +0100, Mark Wielaard wrote: > > Unfortunately buildbot itself doesn't show the config.log. > Trying to get that... > > configure:6961: checking for library containing ZSTD_compressStream2 > configure:6992: gcc -o conftest -D_FORTIFY_SOURC

[PATCH] libdwfl: Don't undef _

2022-12-21 Thread Mark Wielaard
A couple of files undefined _, which is defined in lib/eu-config.h as gettext helper macro. This seems unnecessary and arbitrary. Signed-off-by: Mark Wielaard --- libdwfl/ChangeLog| 7 +++ libdwfl/core-file.c | 1 - libdwfl/dwfl_segment_report_module.c

Re: [PATCH 08/25] Use configure to detect HAVE_DECL_MMAP and use it for system doesn't provide sys/mman.h

2022-12-21 Thread Mark Wielaard
Hi, On Wed, 2022-12-21 at 00:30 +0800, 罗勇刚(Yonggang Luo) via Elfutils-devel wrote: > On Tue, Dec 20, 2022 at 10:04 PM Mark Wielaard > wrot > > I have to think what it means for a system that doesn't have mmap > > since > > the mmap extensions are part of the

Re: ☠ Buildbot (GNU Toolchain): elfutils - failed compile (failure) (master)

2022-12-21 Thread Mark Wielaard
ourceware.org/buildbot/#builders/39/builds/117/steps/6/logs/stdio Oops, we need a version check to see if CURL_AT_LEAST_VERSION is available... doh. Fixed with the attached patch. Cheers, Mark From 304741e11018c29e7ff17751e05dcc5c786a3fd9 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed,

Re: [PATCH v2 05/16] libcpu: Remove the need of NMNES by using enum

2022-12-21 Thread Mark Wielaard
386_mne.h" > + > #define obstack_chunk_alloc xmalloc > #define obstack_chunk_free free > > @@ -1107,11 +1109,6 @@ print_op_fct (const void *nodep, VISIT value, > } > } > > - > -#if NMNES < 2 > -# error "bogus NMNES value" > -#endif > - > static void > instrtable_out (void) > { > @@ -1123,7 +1120,7 @@ instrtable_out (void) >fprintf (outfile, "#define MNEMONIC_BITS %zu\n", > best_mnemonic_bits); > #else >fprintf (outfile, "#define MNEMONIC_BITS %ld\n", > -lrint (ceil (log2 (NMNES; > +lrint (ceil (log2 (MNE_COUNT; > #endif >fprintf (outfile, "#define SUFFIX_BITS %d\n", nbitsuf); >for (int i = 0; i < 3; ++i) OK. Thanks, Mark

Re: [PATCH v2 06/16] libcpu: Use __asm instead asm that can be recognized by both clang-cl and gcc

2022-12-21 Thread Mark Wielaard
y ugly code :{ But added a ChangeLog entry and pushed as attached. Thanks, Mark From 1984819d6ee2dc56583d3f11b9f6e3b2f491f62e Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Sun, 18 Dec 2022 00:52:03 +0800 Subject: [PATCH] libcpu: Use __asm instead of asm to mark variables as used This block

Re: [PATCH v2 12/16] libasm/debuginfod: fchmod doesn't present on win32

2022-12-21 Thread Mark Wielaard
_CANNOT_CHMOD); >return -1; > } > +#endif I don't like the __WIN32 define checks. Is fchmod really not available?? It seems it is a standard Posix function. Can we have a configure check for it then? Thanks, Mark

Re: [PATCH v2 15/16] libelf: F_GETFD may not predefined with msvc/mingw, guard the usage of it

2022-12-21 Thread Mark Wielaard
ildes < 0) > +{ > + return NULL; > +} > +#endif That new return NULL is missing a __libelf_seterrno. Cheers, Mark

Re: [PATCH] lib: Remove -ffunction-sections for xmalloc

2022-12-21 Thread Mark Wielaard
On Tue, Dec 20, 2022 at 11:22:23PM +0100, Mark Wielaard wrote: > The build used -ffunction-sections just for one file. > > +2022-12-20 Mark Wielaard > + > + * Makefile.am (xmalloc_CFLAGS): Remove. Pushed.

Re: [PATCH v2 16/16] lib: Use HAVE_LIBINTL_H to guard #include

2022-12-21 Thread Mark Wielaard
AVE_LIBINTL_H) > #include > +#endif > + > /* gettext helper macros. */ > #define N_(Str) Str > +#if defined(HAVE_LIBINTL_H) > #define _(Str) dgettext ("elfutils", Str) > +#else > +#define _(Str) N_(Str) > +#endif So I think the guard here is should be #if ENABLE_NLS Also just define _(Str) Str directly instead of going through N_(Str). Cheers, Mark

Re: [PATCHv2] support ZSTD compression algorithm

2022-12-21 Thread Mark Wielaard
leanup; O, that is good. Is the abort () at the second call site because that cannot happen? Or should that also goto cleanup? Cheers, Mark

Re: [PATCH v4] Add support for Synopsys ARCv2 processors

2022-12-21 Thread Mark Wielaard
ug-rel-ppc64-z.o > runtest testfile-debug-rel-ppc64-g.o > PASS run-strip-reloc.sh (exit status: 0) > > Signed-off-by: Shahab Vahedi > --- > Changelog: > v4: > - Add EM_ARCV2 to valid_e_machine[] in src/elflint.c. > - Add a link to ARCv3 elf document in arc_init.c. > - Update ChangeLogs. Very nice. Pushed. Thanks, Mark

Re: [PATCH] libdwfl: Don't undef _

2022-12-21 Thread Mark Wielaard
On Wed, Dec 21, 2022 at 04:43:05PM +0100, Mark Wielaard wrote: > A couple of files undefined _, which is defined in lib/eu-config.h as > gettext helper macro. This seems unnecessary and arbitrary. Pushed.

Re: ☠ Buildbot (GNU Toolchain): elfutils-try-debian-armhf - failed compile (failure) (users/marxin/try-zstd-support-v2)

2022-12-21 Thread Mark Wielaard
#x27;s present in zstd since 1.4.0. Can we somehow specify library > version > in configure.ac? It isn't as nice, but since there seems to be a pkgconfig libzstd.pc you could use PKG_CHECK_MODULES. See for example how we check for libcurl. Cheers, Mark

Re: ☠ Buildbot (GNU Toolchain): elfutils-try-debian-armhf - failed compile (failure) (users/marxin/try-zstd-support-v2)

2022-12-22 Thread Mark Wielaard
On Thu, 2022-12-22 at 10:09 +0100, Martin Liška wrote: > On 12/22/22 00:38, Mark Wielaard wrote: > > Hi Martin, > > > > On Wed, Dec 21, 2022 at 07:29:19PM +0100, Martin Liška wrote: > > > > What goes wrong is that this debian old stable arm setup has >

Re: [PATCHv2] support ZSTD compression algorithm

2022-12-22 Thread Mark Wielaard
press_zlib also isn't an internal_function, it can/must just be static. > [...] > +#ifdef USE_ZSTD So this is the compression part, guard that with USE_ZSTD_COMPRESS. > + > void * > internal_function > -__libelf_decompress (void *buf_in, size_t size_in, size_t si

elfutils-devel@sourceware.org

2022-12-31 Thread Mark Wielaard
On Tue, Nov 15, 2022 at 10:44:32PM +0100, Mark Wielaard wrote: > https://www.fsf.org/events/sourceware-infrastructure-a-presentation-and-community-q-a > https://inbox.sourceware.org/overseers/6e9cde97-d880-5343-6cfd-16a648cf6...@fsf.org/ > > We like to discuss how to use the new in

[PATCH] readelf: Check compression status of .debug section data

2023-01-10 Thread Mark Wielaard
The various print_debug_*_section functions didn't get the section data in the same way. Add a new get_debug_elf_data function that gets the (possibly relocated) section data and that checks (and warns) if the data might still be compressed in a way that we cannot decompress. Signed-off-by:

[COMMITTED] Fix typos from codespell

2023-01-13 Thread Mark Wielaard
From: Sam James debuginfod/ChangeLog: * debuginfod-client.c: Typo simultaniously. doc/ChangeLog: * debuginfod.8: Typo succesfully. lib/ChangeLog: * dynamicsizehash_concurrent.c: Typo modul. * system.h: Typo dependend. libdwfl/ChangeLog: * open.c: Typ

Re: [PATCH] readelf: Check compression status of .debug section data

2023-01-16 Thread Mark Wielaard
Hi, On Tue, 2023-01-10 at 18:44 +0100, Mark Wielaard wrote: > The various print_debug_*_section functions didn't get the section > data in the same way. Add a new get_debug_elf_data function that > gets the (possibly relocated) section data and that checks (and > warns) if the da

[PATCH] backends: sparc uses NONE relocation type in ET_EXEC and ET_DYN files

2023-01-19 Thread Mark Wielaard
Using the NONE relocation doesn't do anything, but is harmless. This fixes several (self) tests on sparc that use elflint to check files are valid ELF. Signed-off-by: Mark Wielaard --- backends/ChangeLog | 4 backends/sparc_reloc.def | 2 +- 2 files changed, 5 insertions(

Re: [PATCH] backends: sparc uses NONE relocation type in ET_EXEC and ET_DYN files

2023-01-19 Thread Mark Wielaard
ood to me. Thanks, pushed. Cheers, Mark

[COMMITTED] tests: run-debuginfod-query-retry.sh /bin/sh might not have a build-id

2023-01-19 Thread Mark Wielaard
If /bin/sh wasn't build with build-id the test fails because debuginfod-find will not be able to even try to fetch something. Use libdebuginfod.so.1 instead as test file because we just build that and configure makes sure we always produce a build-id. Signed-off-by: Mark Wielaard ---

[PATCH] libdw: Search for abstract origin in the correct CU

2023-01-23 Thread Mark Wielaard
. This always failed, causing to do a needless traversal, followed by the full CU scan in dwarf_getscopes. Just always stop the pc_record search and then do the CU origin_match in dwarf_getscopes. Signed-off-by: Mark Wielaard --- libdw/ChangeLog| 6 + libdw/dwarf_getscopes.c

[PATCH] addr2line: -C should not try to handle optional (ignored) argument

2023-01-23 Thread Mark Wielaard
. --demangle still takes an optional (ignored) argument, but -C doesn't take any arguments so -Cfi acts the same as -fiC. Also fix --target, -b, so that it is properly ignored (and not accidentially enables demangling). Signed-off-by: Mark Wielaard --- src/ChangeLog | 5 ++

Re: [PATCH] libdwfl: add check for elf_memory return value

2023-01-26 Thread Mark Wielaard
finding this, Cheers, Mark

Re: [PATCH] libdw: check memory access in get_(u|s)leb128

2023-01-26 Thread Mark Wielaard
endp. Precisely so at least one byte could be read without needing to bounds check. See the following commits: commit 7a053473c7bedd22e3db39c444a4cd8f97eace25 Author: Mark Wielaard Date: Sun Dec 14 21:48:23 2014 +0100 libdw: Add get_uleb128 and get_sleb128 bounds checking. Both get_ul

Re: ☠ Buildbot (Sourceware): elfutils - failed 'autoreconf -f ...' (failure) (master)

2023-01-26 Thread Mark Wielaard
> https://builder.sourceware.org/buildbot/#builders/39/builds/130/steps/3/logs/stdio > autoreconf: cannot create /tmp/ar8164.3090: No space left on device at /usr/bin/autoreconf line 689. Oops. Will fix. Apologies, Mark

Sourceware network outage, Tuesday 2023-01-31

2023-01-30 Thread Mark Wielaard
We've received word from our data centre hosts that they will have a network infrastructure outage tomorrow, Tuesday 2023-01-31, between 8am and 12am EST (UTC-5). We may follow that up with a server firmware-related update/boot. This impacts sourceware.org, builder.sourceware.org, patchwork.source

Re: [PATCH] addr2line: -C should not try to handle optional (ignored) argument

2023-01-30 Thread Mark Wielaard
Hi, On Mon, Jan 23, 2023 at 10:11:28AM +0100, Mark Wielaard wrote: > The --demangle option takes an option (ignored) argument. Since -C > is the short option of --demangle it also takes that optional > argument. But that means that something like -Cfi is like -C got > fi as argumen

Re: [PATCH] libdw: Search for abstract origin in the correct CU

2023-01-30 Thread Mark Wielaard
Hi, On Mon, Jan 23, 2023 at 10:15:20AM +0100, Mark Wielaard wrote: > With gcc -flto the abstract origin of an inlined subroutine > could be in a different CU. dwarf_getscopes might return an > empty scope if it cannot find the abstract origin scope. So > make sure to search in the

Re: [PATCH] libdw: check memory access in get_(u|s)leb128

2023-02-07 Thread Mark Wielaard
the audit of readelf.c and elflint.c and see if adding both those checks and your hardening checks don't pessimize the code too much. Hopefully it won't and we can just add all the extra checks. Cheers, Mark diff --git a/libdw/cfi.c b/libdw/cfi.c index 6d08ca90..a7174405 100644 ---

Re: [PATCH RFC 00/11] Add Memory Sanitizer support

2023-02-07 Thread Mark Wielaard
eadelf: Fix set but not used parameter > readelf: Fix set but not used variable > Initialize reglocs for VMCOREINFO > addr2line: Do not test demangling in run-addr2line-i-test.sh > x86_64_return_value_location: Support lvalue and rvalue references > configure: Use -fno-addrsig if possible > configure: Add --disable-demangle > configure: Add --enable-sanitize-memory Thanks for splitting things out so nicely in separate patches. Cheers, Mark

Re: [PATCH RFC 01/11] libdwfl: Fix debuginfod_client redefinition

2023-02-07 Thread Mark Wielaard
s that use dwfl_get_debuginfod_client() without > #including "debuginfod.h", but such cases should be rare. This was recently reported by someone else and fixed differently: commit 45576ab5f24cd39669a418fa8e005b4d04f8e9ca Author: Mark Wielaard Date: Mon Feb 6 10:21:58 2023 +

Re: [PATCH RFC 02/11] libasm: Fix xdefault_pattern initialization

2023-02-07 Thread Mark Wielaard
ith some of the commit message explanation? Your explanation is much better than "play some dirty trick" :) > const struct FillPattern *__libasm_default_pattern = > &xdefault_pattern.pattern; I am surprised this doesn't need a cast. Do you know why? Thanks, Mark

Re: [PATCH RFC 03/11] printversion: Fix unused variable

2023-02-07 Thread Mark Wielaard
maining, NULL); if (remaining != argc) error (EXIT_FAILURE, 0, Then debuginfod --help will say: Report bugs to https://sourceware.org/bugzilla. That of course doesn't help with the -Wunused-const-variable warning. If we cannot figure out the magic variable naming trick with wit

Re: [PATCH RFC 04/11] readelf: Fix set but not used parameter

2023-02-08 Thread Mark Wielaard
e a register doesn't have a number of bits which isn't a multiple of 8 (only ia64 has some 1 bit registers, but those don't seem part of the core register set). If we do accidentally try to handle such a register having an abort is also not very nice. Lets just warn and return/continu

Re: [PATCH RFC 05/11] readelf: Fix set but not used variable

2023-02-08 Thread Mark Wielaard
t; > Fix by deleting it. yeah, this is clearly a copy/paste from print_debug_macinfo_section into print_debug_macro_section where the nculist isn't actually used. Not much to add, so pushed as is. Thanks, Mark > > Signed-off-by: Ilya Leoshkevich > --- > src/readelf.c | 2 --

Re: [PATCH RFC 06/11] Initialize reglocs for VMCOREINFO

2023-02-08 Thread Mark Wielaard
ee passing of an undefined value as "use". But I think msan is technically correct that passing an indeterminate value to a function provokes undefined behavior. Also it is of course more consistent with the rest of the code which does initialize reglocs even when nregloc is zero. Pushed as i

Re: [PATCH RFC 10/11] configure: Add --disable-demangle

2023-02-08 Thread Mark Wielaard
angle support : Should be either yes or no, even when --enable-demangler or --disable- demangler isn't given. Cheers, Mark > +AS_IF([test "x$enable_demangler" == xyes], > AC_CHECK_LIB([stdc++], [__cxa_demangle], [dnl > AC_DEFINE([USE_DEMANGLE], [1], [Defined

Re: [PATCH RFC 07/11] addr2line: Do not test demangling in run-addr2line-i-test.sh

2023-02-08 Thread Mark Wielaard
Hi Ilya, On Mon, 2023-02-06 at 23:25 +0100, Ilya Leoshkevich via Elfutils-devel wrote: > There is run-addr2line-i-demangle-test.sh for that. Well spotted. Pushed as is. Thanks, Mark > Signed-off-by: Ilya Leoshkevich > --- > tests/run-addr2line-i-test.sh | 14 +++--- >

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

2023-02-08 Thread Mark Wielaard
today, which also seemed a false positive. The log has: terminate called after throwing an instance of 'sqlite_exception' But we should catch that (a reportable_exception) almost always. Odd. Cheers, Mark > Steps: > > - 0: worker_preparation ( success ) > > - 1: set

Re: [PATCH v2 1/7] libasm: Fix xdefault_pattern initialization

2023-02-09 Thread Mark Wielaard
If an object that has static or thread storage duration is not > initialized explicitly, then ... if it is a union, the first named > member is initialized (recursively) according to these rules, and > any padding is initialized to zero bits. > Thanks, pushed. Mark

Re: [PATCH v2 3/7] readelf: Fix set but not used parameter

2023-02-09 Thread Mark Wielaard
gloc, const void > *desc, >^ > > Mark Wielaard says: > > It is never really used since as far as I can see we don't have any > backend with a core register sets where a register doesn't have a >

Re: [PATCH v2 5/7] configure: Use -fno-addrsig if possible

2023-02-09 Thread Mark Wielaard
cs/Extensions.html#sht-llvm-addrsig-section-address-significance-table > [2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105625 That looks like a good generic configure check. Pushed. Thanks, Mark > Signed-off-by: Ilya Leoshkevich > --- > configure.ac | 8 > 1 file c

Re: [PATCH v2 6/7] configure: Add --disable-demangler

2023-02-09 Thread Mark Wielaard
Hi Ilya, On Wed, 2023-02-08 at 20:52 +0100, Ilya Leoshkevich wrote: > __cxa_demangle is normally implemented in the C++ runtime library, > instrumenting which for MSan is a hassle. Add a knob for disbling it. Thanks for the fixes. Pushed, Mark > Signed-off-by: Ilya Le

Re: [PATCH v2 4/7] x86_64_return_value_location: Support lvalue and rvalue references

2023-02-09 Thread Mark Wielaard
eed a similar update? Thanks, Mark > Signed-off-by: Ilya Leoshkevich > --- > backends/x86_64_retval.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/backends/x86_64_retval.c b/backends/x86_64_retval.c > index f9114cb1..e668eacc 100644 > --- a/backends/x86_64_retv

Re: [PATCH RFC 03/11] printversion: Fix unused variable

2023-02-09 Thread Mark Wielaard
/* Parse and process arguments. */ int remaining; - argp_program_version_hook = print_version; // this works (void) argp_parse (&argp, argc, argv, ARGP_IN_ORDER, &remaining, NULL); if (remaining != argc) error (EXIT_FAILURE, 0, Thanks, Mark

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

2023-02-09 Thread Mark Wielaard
isn't your patch. It is some bug in libmicrohttpd that only sometimes triggers: libmicrohttpd error: Call to epoll_ctl failed: Bad file descriptor Fatal error in GNU libmicrohttpd daemon.c:2927: Close socket failed. Cheer, Mark > Steps: > > - 0: worker_preparation (

[PATCH] libdw: Handle DW_OP_GNU_uninit in dwarf_getlocation

2023-02-10 Thread Mark Wielaard
dwarf_getlocation would return an error when it saw a DW_OP_GNU_uninit. Handle it by simply recognizing as a no argument operation. DW_OP_GNU_uninit is emitted by GCC as a marker to flag the location expression as referring to an uninitialized value. Signed-off-by: Mark Wielaard --- libdw

Re: [PATCH] libdw: check memory access in get_(u|s)leb128

2023-02-11 Thread Mark Wielaard
ddrp, const unsigned char *end) /* Unroll the first step to help the compiler optimize for the common single-byte case. */ - if (likely (max > 0)) -get_sleb128_step (acc, *addrp, 0); + get_sleb128_step (acc, *addrp, 0); for (size_t i = 1; i < max; ++i) get_sleb128_step (acc, *addrp, i); Cheers, Mark

[PATCH] libdw, readelf, elflint: Add get_(u|s)leb128 guards

2023-02-12 Thread Mark Wielaard
Add sanity check making sure an leb128 isn't being read beyond the end of the current data segment. Most code already had these guards, but some were missing. This makes sure an appropriate error is generated instead. Signed-off-by: Mark Wielaard --- libdw/ChangeLog

Re: (subset) [PATCH v3 1/4] tests: Ignore dwfl-report-offline-memory

2023-02-14 Thread Mark Wielaard
On Mon, 13 Feb 2023 17:45:48 +0100, Ilya Leoshkevich wrote: > It's showing up in git status when configuring in the source directory. > > Applied, thanks! [1/4] tests: Ignore dwfl-report-offline-memory commit: 8ececddf9de612bc556b16df234254291196a65d Best regards, -- Mark Wielaard

Re: (subset) [PATCH v3 2/4] printversion: Fix unused variable

2023-02-14 Thread Mark Wielaard
on.h:47:21: note: expanded from macro > 'ARGP_PROGRAM_BUG_ADDRESS_DEF' > const char *const apba__ __asm ("argp_program_bug_address") > ^ > > [...] Applied, thanks! [2/4] printversion: Fix unused variable commit: 47297d8bf2f516b66b6d45934849137ab7658a99 Best regards, -- Mark Wielaard

Re: [PATCH v3 3/4] backends: Support returning lvalue and rvalue references

2023-02-14 Thread Mark Wielaard
USE_VALGRIND Thanks, Mark

Re: [PATCH v3 4/4] configure: Add --enable-sanitize-memory

2023-02-14 Thread Mark Wielaard
Disable a few tests that run for more than 5 minutes due to test files > being statically linked with MSan. Although I wasn't able to test this locally it looks all good. I did check the _FORTIFY_SOURCE and like flags are still normal and no tests are skipped without --enable-sanitize-memory. Pushed. Thanks, Mark

Re: [PATCH v2] libdw: check memory access in get_(u|s)leb128

2023-02-14 Thread Mark Wielaard
patch to add extra guards in the callers of get_(u|s)leb128, because that does provide us with better error messages. Thanks, Mark

Re: [PATCH] libdw: Handle DW_OP_GNU_uninit in dwarf_getlocation

2023-02-14 Thread Mark Wielaard
Hi, On Fri, 2023-02-10 at 14:01 +0100, Mark Wielaard wrote: > dwarf_getlocation would return an error when it saw a > DW_OP_GNU_uninit. Handle it by simply recognizing as a no argument > operation. > > DW_OP_GNU_uninit is emitted by GCC as a marker to flag the location > expre

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

2023-02-14 Thread Mark Wielaard
as just pushed. So hopefully we'll see this turn green soon. Cheers, Mark

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

2023-02-14 Thread Mark Wielaard
On Tue, Feb 14, 2023 at 04:56:39PM +, builder--- via Elfutils-devel wrote: > A new failure has been detected on builder elfutils-opensuseleap-x86_64 while > building elfutils. > > Full details are available at: > https://builder.sourceware.org/buildbot/#builders/90/builds/119 > > Build s

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

2023-02-14 Thread Mark Wielaard
gt; > Build state: failed test (failure) > Revision: 922068cebba6ed0dfc2da0a9e40e3e1b63e0aca9 > Worker: debian-armhf > Build Reason: (unknown) > Blamelist: Mark Wielaard [...] > A new failure has been detected on builder elfutils-debian-i386 while > building elfut

[COMMITTED] libdw: Correct data end checkfor deref_type operand in dwarf_getlocation

2023-02-14 Thread Mark Wielaard
In __libdw_intern_expression we checked for one byte too many. We only need one byte for the size and (at least one) for the uleb128 DIE reference. Signed-off-by: Mark Wielaard --- This wrong check caused the recent buildbot failure on some arches. libdw/ChangeLog | 5 + libdw

[COMMITTED] doc: Add .TP before -g in debuginfod.8

2023-02-14 Thread Mark Wielaard
Fixes indentation of -g option. Signed-off-by: Mark Wielaard --- doc/ChangeLog| 4 doc/debuginfod.8 | 1 + 2 files changed, 5 insertions(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index b2ef357a..7f2d6ff4 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2023-02-14

Re: Issue 55999 in oss-fuzz: elfutils: Fuzzing build failure

2023-02-15 Thread Mark Wielaard
https://inbox.sourceware.org/elfutils-devel/6e576e707fa3da14f4e9045cbf53ba887823a543.ca...@linux.ibm.com/T/ Thanks, Mark On Wed, 2023-02-15 at 04:01 -0800, ClusterFuzz-External via monorail via Elfutils-devel wrote: > Status: New > Owner: > CC: elfut...@sourceware.org, da...@adal

[PATCH] configure: Error when demangler is enabled, but libstdc++ support isn't

2023-02-15 Thread Mark Wielaard
There have been a couple of cases where demangler support has been accidentially been disabled because libstdc++ wasn't there/installed during build. Make it an error if --disable-demangler isn't explicitly given. Signed-off-by: Mark Wielaard --- ChangeLog| 5 + configure.ac

elfutils code names

2023-02-16 Thread Mark Wielaard
.180 "We got an L, we got an T, can we have a O?" 0.181 "Show me your ARMs" 0.182 "October Surprise!" 0.183 "100+ commits" 0.184 "negative results" 0.185 "oops, I did it again" 0.186 "Just In Time" 0.187 "no zero negatives" 0.188 "no section left behind" I believe some older versions also had code names, but I could not find them. Cheers, Mark

Re: [PATCH] configure: Error when demangler is enabled, but libstdc++ support isn't

2023-02-16 Thread Mark Wielaard
Hi Florian, On Thu, 2023-02-16 at 11:48 +0100, Florian Weimer via Elfutils-devel wrote: > * Mark Wielaard: > > > + [AC_MSG_ERROR([__cxa_demangle not found in libstdc++ use > > --disable-demangler to disable demangler support.])]), > > Missing punctuation after

Re: Issue 55999 in oss-fuzz: elfutils: Fuzzing build failure

2023-02-16 Thread Mark Wielaard
hat it doesn't link properly with libasan/ubsan when -fsanitize=address/undefined is given. If you could add a configure check for that bug then we could add the no no-undefined trick independent of compiler used. Cheers, Mark

Re: [PATCH] PR28873 - Implement eu-readelf -D

2023-02-16 Thread Mark Wielaard
.cgi?id=28873 > > Signed-off-by: Di Chen Very nice. Note that my local build (gcc 12.2.1) says: In function ‘handle_dynamic_symtab’, inlined from ‘print_symtab’ at /home/mark/src/elfutils/src/readelf.c:2451:9: /home/mark/src/elfutils/src/readelf.c:2535:29: error: ‘syments’ may be us

Re: A scenario where Perf cannot unwind the user stack by dwarf with libdw.so

2023-02-16 Thread Mark Wielaard
Could you show the backtrace at this point? (Note that gdb believes you have changed the sources, but haven't rebuild libdw.so) Thanks, Mark

Re: [PATCH] configure: Error when demangler is enabled, but libstdc++ support isn't

2023-02-16 Thread Mark Wielaard
Hi Florian, On Thu, Feb 16, 2023 at 06:02:49PM +0100, Florian Weimer via Elfutils-devel wrote: > * Mark Wielaard: > > Which I find slightly odd, but I don't fully grok autoconf quotes. > > > > Does the following do what you expect? > > Yes, but even though I patc

Re: [PATCH v2 1/1] libdw: check that DWARF strings are null-terminated

2023-02-16 Thread Mark Wielaard
>= data_size) > goto invalid_offset; > } O, the original check was actually one off. Looks good. Pushed as is. Thanks, Mark

[PATCH] libasm: Fix use-after-free issue with circular single linked list cleanup

2023-02-17 Thread Mark Wielaard
550 | free (oldp); | ^~~ Fix by freeing scnp->content last. Signed-off-by: Mark Wielaard --- libasm/ChangeLog | 4 libasm/asm_end.c | 18 ++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/libasm/ChangeLog b/libasm/ChangeLog index a1

Re: Issue 56085 in oss-fuzz: elfutils: Fuzzing build failure

2023-02-17 Thread Mark Wielaard
(no return type) for DIEs that point to a DW_TAG_unspecified_type. Cheers, Mark On Fri, Feb 17, 2023 at 10:04:40AM -0800, ClusterFuzz-External via monorail via Elfutils-devel wrote: > Status: New > Owner: > CC: elfut...@sourceware.org, da...@adalogics.com, evv..

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

2023-02-17 Thread Mark Wielaard
/116 > > Build state: failed test (failure) > Revision: 77d237798c8f262d618bd3ed2db8864022bfcacb > Worker: bb1-2 > Build Reason: (unknown) > Blamelist: Mark Wielaard Grrr, it is FAIL: run-debuginfod-federation-metrics.sh again :{

Re: MemorySanitizer: Use-of-uninitialized-value in check_section

2023-02-20 Thread Mark Wielaard
robably in the "conversion function" not converting extra garbage data at the end. The issue is trying to get a big endian ELF file containing a .debug_line_str of type GNU_HASH (which is nonsensical in the first place). There are a couple of ways to "fix" this. I'll post some p

Fix some .debug checking and gnu hash xlate logic

2023-02-20 Thread Mark Wielaard
ually be used, just checked for validity. But these patches make sure the result is deterministic. Cheers, Mark

[PATCH 1/2] libelf: memmove any extra bytes left by elf_cvt_gnuhash conversion

2023-02-20 Thread Mark Wielaard
Otherwise some undefined bytes might be left in the buffer. Now they might still be not useful, but at least they are as defined in the file. Signed-off-by: Mark Wielaard --- ChangeLog | 4 libelf/gnuhash_xlate.h | 12 ++-- 2 files changed, 14 insertions(+), 2

[PATCH 2/2] libdw: Use elf_rawdata when checking .debug section

2023-02-20 Thread Mark Wielaard
.debug sections are raw bytes and don't need conversion even when host and file have different endian order. Signed-off-by: Mark Wielaard --- libdw/ChangeLog | 4 libdw/dwarf_begin_elf.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libdw/Change

Re: [PATCH 2/2] libdw: Use elf_rawdata when checking .debug section

2023-02-21 Thread Mark Wielaard
Hi, On Tue, 2023-02-21 at 05:28 +0300, Evgeny Vereshchagin wrote: > On Mon, 20 Feb 2023 at 19:03, Aleksei Vetrov wrote: > > On Mon, Feb 20, 2023 at 3:55 PM Mark Wielaard wrote: > > > > > > .debug sections are raw bytes and don't need conversion even when ho

Re: [PATCH] libasm: Fix use-after-free issue with circular single linked list cleanup

2023-02-21 Thread Mark Wielaard
Hi, On Fri, 2023-02-17 at 15:00 +0100, Mark Wielaard wrote: > Pointed out by gcc 12 with -Wuse-after-free=3 > > In function ‘free_section’ > asm_end.c:552:17: error: pointer ‘data’ used after ‘free’ > [-Werror=use-after-free] > 552 | while (old

elfutils 0.189 release next week

2023-02-21 Thread Mark Wielaard
: https://patchwork.sourceware.org/project/elfutils/list/ [*] If your patch is not on that list please ping. I propose to do the 0.189 release on Tuesday February 28, but it can be earlier or later if that is more convenient. Cheers, Mark [*] That is this list of patches: git pw patch list --format

Re: elfutils code names

2023-02-21 Thread Mark Wielaard
On Thu, 2023-02-16 at 13:37 +0100, Mark Wielaard wrote: > Hi, > > On irc (#elfutils on libera.chat) we had a discussion about the > elfutils code names. For some reason those are only in the irc channel > topic. Which seems to mean not many people know about them. I could > rec

[COMMITTED] Update m4 files from autoconf-archive

2023-02-21 Thread Mark Wielaard
Update m4/ax_check_compile_flag.m4 and m4/ax_cxx_compile_stdcxx.m4 to autoconf-archive-2023.02.20. Signed-off-by: Mark Wielaard --- m4/ax_check_compile_flag.m4 | 33 +-- m4/ax_cxx_compile_stdcxx.m4 | 532 +--- 2 files changed, 503 insertions(+), 62 deletions

Re: [PATCHv2] strip: keep .ctf section in stripped file

2023-02-22 Thread Mark Wielaard
Hi, On Tue, 2022-12-20 at 22:35 +0100, Mark Wielaard wrote: > On Wed, Jun 01, 2022 at 10:55:27AM -0500, Guillermo E. Martinez via > Elfutils-devel wrote: > > This is the second version patch to avoid remove the CTF section in > > stripped files. Changes from v1: > > &g

[PATCH] libdw: Fix dwarf_getscopes memory leak on error

2023-02-22 Thread Mark Wielaard
When there is an error in dwarf_getscopes after the initial scopes have been allocated, e.g. when looking for the inlined scopes, then the scopes would leak. Fix this by explicitly free the scopes on error. https://sourceware.org/bugzilla/show_bug.cgi?id=29434 Signed-off-by: Mark Wielaard

Re: [PATCH RFC] backends: Add RISC-V object attribute printing

2023-02-22 Thread Mark Wielaard
Hi, On Fri, Nov 25, 2022 at 05:29:19PM +0100, Martin Liška wrote: > On 10/13/22 16:53, Mark Wielaard wrote: > > On Wed, 2022-08-10 at 11:27 +0200, Andreas Schwab via Elfutils-devel > > wrote: > >> This does not work yet. The RISC-V attribute tags use the same &g

Re: [PATCHv2] strip: keep .ctf section in stripped file

2023-02-22 Thread Mark Wielaard
or referenced from an allocated section/symbol table). Cheers, Mark

Re: elfutils code names

2023-02-23 Thread Mark Wielaard
Hi Martin, On Thu, 2023-02-23 at 09:35 +0100, Martin Liška wrote: > > So 0.169 is missing and I am not sure any version before 0.162 had a > > code name. But if you remember differently please update/correct this > > list. > > A nice archeological work Mark! Please set

Re: [PATCH 2/2] libdw: Use elf_rawdata when checking .debug section

2023-02-23 Thread Mark Wielaard
Hi, On Tue, 2023-02-21 at 12:24 +0100, Mark Wielaard wrote: > On Tue, 2023-02-21 at 05:28 +0300, Evgeny Vereshchagin wrote: > > On Mon, 20 Feb 2023 at 19:03, Aleksei Vetrov wrote: > > > On Mon, Feb 20, 2023 at 3:55 PM Mark Wielaard wrote: > > > > > > > &g

Re: A scenario where Perf cannot unwind the user stack by dwarf with libdw.so

2023-02-23 Thread Mark Wielaard
Hi, On Thu, 2023-02-16 at 23:48 +0100, Mark Wielaard wrote: > On Mon, Feb 13, 2023 at 01:44:39AM +, liuxu (AJ) via Elfutils-devel wrote: > > I am failing to unwind the user stack with libdw on Ubuntu 18.04 > > arm64 environment, the toolchain used is clang 12.0.1. form th

Re: [PATCH v2 02/16] move platform depended include into system.h of libebl

2023-02-23 Thread Mark Wielaard
f this patch: https://inbox.sourceware.org/elfutils-devel/19dc6579ce183b63a8956b17611e4a264d745b34.ca...@klomp.org/ I have since pushed: commit 6ecd16410ce1fe5cb0ac5b7c3342c5cc330e3a04 Author: Mark Wielaard Date: Tue Dec 20 14:53:43 2022 +0100 Do not use relative include paths in l

Re: [PATCH v2 03/16] Use configure to detect HAVE_DECL_MMAP and use it for system doesn't provide sys/mman.h

2023-02-23 Thread Mark Wielaard
not written to the file. */ Specifically because libdw does reply on some of them. Thanks, Mark

Re: [PATCH v2 04/16] Fixes usage of basename about prototype differences

2023-02-23 Thread Mark Wielaard
ion. We use the GNU one which doesn't manipulate the given string. See https://www.man7.org/linux/man-pages/man3/basename.3.html#NOTES Cheers, Mark

Re: [PATCH v2 05/16] libcpu: Remove the need of NMNES by using enum

2023-02-23 Thread Mark Wielaard
Hi, On Wed, 2022-12-21 at 18:56 +0100, Mark Wielaard wrote: > On Sun, 2022-12-18 at 00:52 +0800, Yonggang Luo via Elfutils-devel > wrote: > > Signed-off-by: Yonggang Luo > > --- > > libcpu/Makefile.am | 2 +- > > libcpu/i386_disasm.c | 14 +-

Re: [PATCH v2 07/16] libdw: Fixes compile of dwarf_whatattr.c and dwarf_whatform.c

2023-02-23 Thread Mark Wielaard
; So always undefined __OPTIMIZE__ when compiling these two files > I don't think this is correct. See also the discussion around v1 of this patch: https://inbox.sourceware.org/elfutils-devel/0bc05adaf492c5f57b0b45f520be14b78f3fbd53.ca...@klomp.org/ Cheers, Mark

Re: [PATCH v2 08/16] lib: Implement error properly even when not HAVE_ERR_H

2023-02-23 Thread Mark Wielaard
g. https://inbox.sourceware.org/elfutils-devel/dbcc7e30f35097e8d231e6a0a071a088f98a7d48.ca...@klomp.org Cheers, Mark

Re: [PATCH v2 10/16] libasm: stdio_ext.h are not present on win32

2023-02-23 Thread Mark Wielaard
KING_BYCALLER); > +#endif > } > >return result; __fsetlocking is used in a lot of other places. Cheers, Mark

<    1   2   3   4   5   6   7   8   9   10   >