Diff between 7f3eda34b5266d2304d74437b4bb3d0237e0be97 and a21b661c7afbc1358439e90ed153706da125de78

Changed Files

File Additions Deletions Status
Makefile.am +6 -0 modified
configure.ac +3 -0 modified
valgrind.supp +14 -0 added

Full Patch

diff --git a/Makefile.am b/Makefile.am
index 3df694c..90e1209 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -428,6 +428,12 @@ if DBUS_RUN_SESSION
 AM_TESTS_ENVIRONMENT += dbus-run-session --
 endif
 
+if VALGRIND
+LOG_COMPILER = valgrind --error-exitcode=1 --num-callers=30
+LOG_FLAGS = --trace-children=yes --leak-check=full --show-reachable=no \
+		--suppressions=$(srcdir)/valgrind.supp --quiet
+endif
+
 pkgconfigdir = $(libdir)/pkgconfig
 
 if LIBRARY
diff --git a/configure.ac b/configure.ac
index 8ea503c..813400b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,9 +35,12 @@ AC_PROG_LIBTOOL
 if (test "$USE_MAINTAINER_MODE" = "yes"); then
 	AC_CHECK_PROG(enable_coverage, [lcov], [yes], [no])
 	AC_CHECK_PROG(enable_dbus_run_session, [dbus-run-session], [yes])
+	AC_CHECK_PROG(enable_valgrind, [valgrind], [yes])
+	AC_CHECK_HEADERS(valgrind/memcheck.h)
 fi
 AM_CONDITIONAL(COVERAGE, test "${enable_coverage}" = "yes")
 AM_CONDITIONAL(DBUS_RUN_SESSION, test "${enable_dbus_run_session}" = "yes")
+AM_CONDITIONAL(VALGRIND, test "${enable_valgrind}" = "yes")
 
 MISC_FLAGS
 
diff --git a/valgrind.supp b/valgrind.supp
new file mode 100644
index 0000000..bf28bcd
--- /dev/null
+++ b/valgrind.supp
@@ -0,0 +1,14 @@
+{
+   ecb_bind
+   Memcheck:Param
+   socketcall.bind(my_addr.sa_data)
+   fun:bind
+   fun:ecb_aes_setup
+}
+{
+   cmac_bind
+   Memcheck:Param
+   socketcall.bind(my_addr.sa_data)
+   fun:bind
+   fun:cmac_aes_setup
+}