[gjs] build: Add LSan suppression file
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] build: Add LSan suppression file
- Date: Fri, 1 Sep 2017 00:10:23 +0000 (UTC)
commit 3b8775fa534b6f6f90a2069fed236573e180c00a
Author: Philip Chimento <philip endlessm com>
Date: Wed Aug 30 13:29:52 2017 -0700
build: Add LSan suppression file
Compiling with ASan also automatically enables LSan (leak sanitizer).
There is an intentional leak (of a few bytes) of GType structures in
GJS, and SpiderMonkey also leaks a few bytes for each GC helper thread.
Add a suppression file (unfortunately, a different format than
Valgrind's suppression file) to make LSan ignore these leaks.
One nice feature of LSan is that it prints a total of bytes leaked for
each suppressed function.
https://bugzilla.gnome.org/show_bug.cgi?id=786995
Makefile-test.am | 2 ++
installed-tests/extra/lsan.supp | 5 +++++
2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/Makefile-test.am b/Makefile-test.am
index 9cbdbe8..9e0fa58 100644
--- a/Makefile-test.am
+++ b/Makefile-test.am
@@ -263,6 +263,7 @@ EXTRA_DIST += \
installed-tests/js/testCairo.js \
installed-tests/js/testGtk.js \
installed-tests/js/testGDBus.js \
+ installed-tests/extra/lsan.supp \
$(NULL)
### TEST EXECUTION #####################################################
@@ -276,6 +277,7 @@ AM_TESTS_ENVIRONMENT = \
export GI_TYPELIB_PATH="$(builddir):$${GI_TYPELIB_PATH:+:$$GI_TYPELIB_PATH}"; \
export LD_LIBRARY_PATH="$(builddir)/.libs:$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH}"; \
export G_FILENAME_ENCODING=latin1; \
+ export LSAN_OPTIONS="suppressions=$(abs_top_srcdir)/installed-tests/extra/lsan.supp"; \
$(XVFB_START) \
$(NULL)
diff --git a/installed-tests/extra/lsan.supp b/installed-tests/extra/lsan.supp
new file mode 100644
index 0000000..4eadd49
--- /dev/null
+++ b/installed-tests/extra/lsan.supp
@@ -0,0 +1,5 @@
+# SpiderMonkey leaks a mutex for each GC helper thread.
+leak:js::HelperThread::threadLoop
+
+# We leak a small wrapper in GJS for each registered GType.
+leak:gjs_gtype_create_gtype_wrapper
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]