Package: valgrind
Version: 1:3.13.0-1
Severity: important
Tags: patch upstream

Dear Maintainer,

I filed a bug upstream: https://bugs.kde.org/show_bug.cgi?id=382998

The easiest way to reproduce is:

$ nc -l -p 20000 &
[1] 2811
$ valgrind --xml-socket=127.0.0.1:20000 --xml=yes true 
valgrind: Bad option: --xml=yes, but no XML destination specified
valgrind: --xml=yes has been specified, but there is no XML output
valgrind: destination.  You must specify an XML output destination
valgrind: using --xml-fd, --xml-file or --xml-socket.
valgrind: Use --help for more information or consult the user manual.
[1]+  Done                    nc -l -p 20000

valgrind does connect to the socket, but closes it immediately (netcat quits 
after valgrind is executed).

-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.11.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE= 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages valgrind depends on:
ii  libc6      2.24-13
ii  libc6-dbg  2.24-13

Versions of packages valgrind recommends:
ii  gdb           7.12-6
pn  valgrind-dbg  <none>

Versions of packages valgrind suggests:
pn  alleyoop      <none>
ii  kcachegrind   4:16.08.3-1
pn  valgrind-mpi  <none>
ii  valkyrie      2.0.0-1+b1

-- no debconf information

Patch follows.

>From f1d5f6cc6a76170812f656dfc913baa80e92fd33 Mon Sep 17 00:00:00 2001
From: Orgad Shaneh <[email protected]>
Date: Tue, 1 Aug 2017 22:19:55 +0300
Subject: [PATCH] Fix parsing of --xml-socket argument

The socket was assigned to log_fd due to copy-paste error.
Then valgrind complained that --xml=yes is enabled, but no
file, fd or socket is given.

https://bugs.kde.org/show_bug.cgi?id=382998
---
 coregrind/m_libcprint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/coregrind/m_libcprint.c b/coregrind/m_libcprint.c
index d66c67d..f6ba202 100644
--- a/coregrind/m_libcprint.c
+++ b/coregrind/m_libcprint.c
@@ -526,7 +526,7 @@ void VG_(init_log_xml_sinks)(VgLogTo log_to, VgLogTo xml_to,
          break;
 
       case VgLogTo_Socket:
-         log_fd = prepare_sink_socket(VG_(clo_xml_fname_unexpanded),
+         xml_fd = prepare_sink_socket(VG_(clo_xml_fname_unexpanded),
                                       &VG_(xml_output_sink), True);
          break;
    }
-- 
2.13.3
>From f1d5f6cc6a76170812f656dfc913baa80e92fd33 Mon Sep 17 00:00:00 2001
From: Orgad Shaneh <[email protected]>
Date: Tue, 1 Aug 2017 22:19:55 +0300
Subject: [PATCH] Fix parsing of --xml-socket argument

The socket was assigned to log_fd due to copy-paste error.
Then valgrind complained that --xml=yes is enabled, but no
file, fd or socket is given.

https://bugs.kde.org/show_bug.cgi?id=382998
---
 coregrind/m_libcprint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/coregrind/m_libcprint.c b/coregrind/m_libcprint.c
index d66c67d..f6ba202 100644
--- a/coregrind/m_libcprint.c
+++ b/coregrind/m_libcprint.c
@@ -526,7 +526,7 @@ void VG_(init_log_xml_sinks)(VgLogTo log_to, VgLogTo xml_to,
          break;
 
       case VgLogTo_Socket:
-         log_fd = prepare_sink_socket(VG_(clo_xml_fname_unexpanded),
+         xml_fd = prepare_sink_socket(VG_(clo_xml_fname_unexpanded),
                                       &VG_(xml_output_sink), True);
          break;
    }
-- 
2.13.3

Reply via email to