`valgrind --track-fds=yes` will report errors for file descriptor leaks
and attempts at closing invalid file descriptors.
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 8f087798..625
Add calls to close for all test programs that leak file descriptors
in order to prevent test failures when run under valgrind
--track-fds=yes.
Signed-off-by: Aaron Merey
---
tests/all-dwarf-ranges.c| 2 ++
tests/alldts.c | 1 +
tests/dwarf-getmacros.c | 3 ++-
tests/dwarf-ra
valgrind --track-fds=yes might incorrectly report an error due to the use
of inherited file descriptors in check_native_core.
Prevent this false positive by temporarily removing "--track-fds=yes" from
$VALGRIND_CMD for the duration of the testrun in check_native_core.
Signed-off-by: Aaron Merey
test-elf_cntl_gelf_getshdr conditionally closes a file descriptor
depending on a command line argument. This causes an error when run
under valgrind --track-fds=yes.
Fix this by unconditionally closing the fd.
Signed-off-by: Aaron Merey
---
tests/test-elf_cntl_gelf_getshdr.c | 20 +-
process_archive may be called with an fd argument of -1, which
libelf interprets as "no file opened". However when closing
the fd process_archive does not check whether the fd is valid
and may attempt to close an fd of -1.
Signed-off-by: Aaron Merey
---
libdwfl/offline.c | 3 ++-
1 file changed
On Thu, Jan 30, 2025 at 11:05:20AM +, parona wrote:
> > Could you show the configure/build flags and the error the compiler
> > gives? I think the patch is correct, but I have trouble replicating
> > the issue.
>
> export CFLAGS="-O0 -pipe"
> autoreconf -fi
> ./configure --enable-stacktrace --
Hello,
On Thursday, January 30th, 2025 at 12:59 PM, Mark Wielaard
wrote:
> Hi,
>
> On Thu, Jan 30, 2025 at 12:05:59AM +, parona wrote:
>
> > While building elfutils on musl with different features enabled I
> > hit this.
> >
> > Curiously this also affects glibc if you explicitly build w
Hi,
On Thu, Jan 30, 2025 at 12:05:59AM +, parona wrote:
> While building elfutils on musl with different features enabled I
> hit this.
>
> Curiously this also affects glibc if you explicitly build without
> optimizations.
Could you show the configure/build flags and the error the compiler
gi