Otherwise any of the tests that use Cairo for PDF output end up with a
bunch of leaks due to libfontconfig weirdness.
$pspp_diff -w "$@"
}
fi
+
+# Enable leak suppressions for Address Sanitizer/Leak Sanitizer.
+LSAN_OPTIONS="suppressions=$abs_top_srcdir/tests/lsan.supp print_suppressions=0"
+export LSAN_OPTIONS
} >'$(srcdir)/package.m4'
check-valgrind:
- $(MAKE) check RUNNER='$(SHELL) $(abs_top_builddir)/libtool --mode=execute valgrind --log-file=valgrind.%p --leak-check=full --num-callers=20' TESTSUITEFLAGS='$(TESTSUITEFLAGS) -d'
+ $(MAKE) check RUNNER='$(SHELL) $(abs_top_builddir)/libtool --mode=execute valgrind --log-file=valgrind.%p --leak-check=full --num-callers=20 --suppressions=$(abs_top_srcdir)/tests/valgrind.supp --read-inline-info=yes --read-var-info=yes' TESTSUITEFLAGS='$(TESTSUITEFLAGS) -d'
@echo
@echo '--------------------------------'
@echo 'Valgrind output is in:'
@echo 'tests/testsuite.dir/*/valgrind.*'
@echo '--------------------------------'
+EXTRA_DIST += tests/valgrind.supp tests/lsan.supp
--- /dev/null
+leak:libfontconfig
--- /dev/null
+# libfontconfig uses offsets instead of pointers so valgrind doesn't
+# recognize when blocks are still in use
+{
+ fontconfig
+ Memcheck:Leak
+ ...
+ fun:FcFontRenderPrepare
+}
+{
+ fontconfig2
+ Memcheck:Leak
+ fun:realloc
+ obj:*libfontconfig.so.*
+}
+{
+ fontconfig3
+ Memcheck:Leak
+ fun:malloc
+ obj:*libfontconfig.so.*
+ ...
+ fun:XML_ParseBuffer
+}