Eric Blake
2021-Aug-23 14:38 UTC
[Libguestfs] [PATCH nbdkit v2 2/2] wrapper: Remove GLIBC_TUNABLES when running under valgrind
On Sun, Aug 22, 2021 at 01:57:16PM +0100, Richard W.M. Jones wrote:> --- > wrapper.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/wrapper.c b/wrapper.c > index ed77a0a1..42a0cd88 100644 > --- a/wrapper.c > +++ b/wrapper.c > @@ -220,6 +220,15 @@ main (int argc, char *argv[]) > * https://lists.fedoraproject.org/archives/list/devel at lists.fedoraproject.org/thread/57EYTAFQJVVG4APOV6AMM7C26H77IQEC/ > */ > unsetenv ("DEBUGINFOD_URLS"); > + > + /* Temporary(?) workaround for: > + * https://sourceware.org/bugzilla/show_bug.cgi?id=28256 > + * > + * But should we actually use malloc checking etc when we are > + * valgrinding? It seems to duplicate work done by valgrind and > + * might even hide issues. > + */ > + unsetenv ("GLIBC_TUNABLES");Good point about reducing the cross-interference between glibc and what valgrind wants to prove. I'm fine if we permanently disable glibc's malloc checking when we know we are running under valgrind. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Richard W.M. Jones
2021-Aug-23 20:33 UTC
[Libguestfs] [PATCH nbdkit v2 2/2] wrapper: Remove GLIBC_TUNABLES when running under valgrind
Thanks for the review. This is what I pushed which I think should incorporate all the suggestions you made. I have also checked it works with older glibc now. https://gitlab.com/nbdkit/nbdkit/-/commit/362e0fdcae37db876e13b944102a5c152e6bc563 https://gitlab.com/nbdkit/nbdkit/-/commit/ae8c815e54e66ac7b421e0a6929c39d9ce3834dc Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v