Add Valgrind suppressions
authorIra W. Snyder <devel@irasnyder.com>
Thu, 24 Jan 2008 03:44:26 +0000 (19:44 -0800)
committerIra W. Snyder <devel@irasnyder.com>
Thu, 24 Jan 2008 03:44:26 +0000 (19:44 -0800)
This adds a suppression file to silence some warnings from GLib and
fontconfig, both of which are out of my control.

Makefile
tilda.suppressions [new file with mode: 0644]

index 1a5179c..0ab9090 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,10 @@ eggaccelerators.o: eggaccelerators.c eggaccelerators.h
        $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS)
 
 memcheck: tilda
-       valgrind --tool=memcheck ./tilda
+       # Variables to make GLib work MUCH better in valgrind
+       export G_DEBUG=gc-friendly
+       export G_SLICE=always-malloc
+       valgrind --suppressions=tilda.suppressions --tool=memcheck --leak-check=full ./tilda
 
 clean:
        rm -f *.o
diff --git a/tilda.suppressions b/tilda.suppressions
new file mode 100644 (file)
index 0000000..e90d315
--- /dev/null
@@ -0,0 +1,53 @@
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:nss_parse_service_list
+   fun:__nss_database_lookup
+   obj:*
+   obj:*
+   fun:getpwnam_r@@GLIBC_2.1.2
+   fun:g_get_any_init_do
+}
+
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:g_malloc
+   fun:g_type_create_instance
+}
+
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:FcPatternObjectInsertElt
+   obj:*
+   obj:*
+   obj:*
+   obj:*
+}
+
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:calloc
+   fun:g_malloc0
+   obj:*
+   obj:*
+   obj:*
+   obj:*
+}
+
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:realloc
+   fun:FcPatternObjectInsertElt
+   obj:*
+   obj:*
+   obj:*
+   obj:*
+}
+