On Tue, 2023-02-07 at 20:05 +0100, Mark Wielaard wrote: > Hi Ilya, > > On Mon, Feb 06, 2023 at 11:25:02PM +0100, Ilya Leoshkevich via > Elfutils-devel wrote: > > This series adds minimalistic support for Memory Sanitizer (MSan) > > [1]. > > MSan is compiler instrumentation for detecting accesses to > > uninitialized memory.
[...] > > - Minimal configuration of elfutils instrumented with MSan: > > > > autoreconf -i > > CC=clang ./configure --enable-maintainer-mode \ > > --enable-sanitize-memory --without-bzlib \ > > --without-lzma --without-zstd \ > > --disable-debuginfod --disable-libdebuginfod > > \ > > --disable-demangler > > Aren't there instrumented versions of bzip2, lzma/xz and/or zstd? > > Can't debuginfod and libdebuginfod be instrumented? > > Is the demangler disabled because you don't link against (an > instrumented) libstdc++? I think with some effort instrumenting the dependencies is possible. bzlib and lzma are not particularly large, and zstd should support this out of the box. Regarding C++, an instrumented LLVM's libc++ should also just work. With all this, it should be possible to test elfutils with MSan without disabling the extra functionality. But since you already test with valgrind, I figured it would be highly unlikely that I find new bugs, and decided to limit the scope here. For my current purposes - linking elfutils into libbpf - this proved to be enough. [...] Best regards, Ilya