[Libguestfs] [PATCH libnbd] tests: Use libc_malloc_debug.so.0 instead of MALLOC_CHECK_ for glibc 2.34
Richard W.M. Jones
rjones at redhat.com
Wed Aug 25 20:27:17 UTC 2021
On Wed, Aug 25, 2021 at 01:26:08PM -0500, Eric Blake wrote:
> On Tue, Aug 24, 2021 at 05:13:24PM +0100, Richard W.M. Jones wrote:
> > This is the nbdkit change transplanted to libnbd. Because there are
> > several subdirectory Makefiles which define the MALLOC_CHECK_
> > environment variables, I turned it into a macro which is placed in the
> > top level subdir-rules.mk.
> Nice refactoring to avoid duplication.
> > Note this currently breaks valgrinding because of:
> > https://sourceware.org/bugzilla/show_bug.cgi?id=28256
> > and because there's not a good place to unset GLIBC_TUNABLES in libnbd.
> Patch looks good to apply (I almost tackled the same project myself
> before seeing your email). Could we modify run.in to define _VG to
> start with 'env -u GLIBC_TUNABLES valgrind' on systems where 'env -u'
> is supported? (Sadly, POSIX doesn't require 'env -u')
I actually thought of another way to fix this but forgot to send a
diff --git a/valgrind/glibc.suppressions b/valgrind/glibc.suppressions
index a03332d9..d0f8ac52 100644
@@ -57,3 +57,14 @@
+# Conditional jump or move depends on uninitialised value(s) in
+# Bug present in glibc 2.34 and fixed in 2.35.
This obviously only suppresses the error rather than fixing it but I
tested it and it allows make check-valgrind to pass partially.
There is actually a further error revealed by valgrinding (but
disguised by the above problem) which I'm looking into.
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
More information about the Libguestfs