Richard W.M. Jones
2021-Aug-22 12:57 UTC
[Libguestfs] [PATCH nbdkit v2 2/2] wrapper: Remove GLIBC_TUNABLES when running under valgrind
---
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");
}
else {
s = getenv ("NBDKIT_GDB");
--
2.32.0
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