[ltt-dev] [UST PATCH] Add a valgrind suppression for sendmsg (v2)

Nils Carlson nils.carlson at ericsson.com
Mon Oct 11 14:43:04 EDT 2010


Changes since v1: Make the suppression match libc and
libpthread, multiple versions.

For some reason valgrind thinks the iov array in ustcomm_send_fd
is used uninitialised. Add a suppression so this won't show as
an error.

Signed-off-by: Nils Carlson <nils.carlson at ericsson.com>
---
 tests/valgrind_suppress.txt |   14 ++++++++++++++
 tests/valgrind_ustd.sh      |    2 +-
 2 files changed, 15 insertions(+), 1 deletions(-)
 create mode 100644 tests/valgrind_suppress.txt

diff --git a/tests/valgrind_suppress.txt b/tests/valgrind_suppress.txt
new file mode 100644
index 0000000..2a4ac36
--- /dev/null
+++ b/tests/valgrind_suppress.txt
@@ -0,0 +1,14 @@
+{
+   sendmsg-iov-errors-libpthread
+   Memcheck:Param
+   socketcall.sendmsg(msg.msg_iov[i])
+   obj:/lib/libpthread-2.*
+   fun:ustcomm_send_fd
+}
+{
+   sendmsg-iov-errors-libc
+   Memcheck:Param
+   socketcall.sendmsg(msg.msg_iov[i])
+   obj:/lib/libc-2.*
+   fun:ustcomm_send_fd
+}
diff --git a/tests/valgrind_ustd.sh b/tests/valgrind_ustd.sh
index 532022d..541d8ca 100755
--- a/tests/valgrind_ustd.sh
+++ b/tests/valgrind_ustd.sh
@@ -34,7 +34,7 @@ pidfilepath="/tmp/ust-testsuite-$USER-$(date +%Y%m%d%H%M%S%N)-ustd-pid"
 mkfifo -m 0600 "$pidfilepath"
 
 VALG_OUT=/tmp/ust-testsuite-valg.txt
-valgrind -q ustd --pidfile "$pidfilepath" -o "$TRACE_DIR" >/dev/null 2>"$VALG_OUT" &
+valgrind --suppressions=$TESTDIR/valgrind_suppress.txt -q ustd --pidfile "$pidfilepath" -o "$TRACE_DIR" >/dev/null 2>"$VALG_OUT" &
 VALG_PID=$!
 USTD_PID="$(<$pidfilepath)"
 
-- 
1.7.1





More information about the lttng-dev mailing list