aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2017-02-01 21:59:14 +0100
committerDario Lombardo <lomato@gmail.com>2017-02-02 12:42:01 +0000
commit30266527aacf4b3cbc7d07a0c56a8ba100b19f49 (patch)
treeabdca9b902e43b93dffe9f3788c8254852c73847 /tools
parentefb5c1537de616826408660f8d9aca659d5297c3 (diff)
tools: add a Gtk/GNOME suppression file.
As described here https://wiki.gnome.org/Valgrind valgrind can be tuned for Gtk/GNOME (glib) software by this official (or so) suppression file. Add it to the standard valgrind script to reduce the output for those functions out of Wireshark scope. Change-Id: I5dbc91ce82a890c9c02b624289ced96909be5f84 Reviewed-on: https://code.wireshark.org/review/19910 Reviewed-by: Dario Lombardo <lomato@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/gtk.suppression294
-rwxr-xr-xtools/valgrind-wireshark.sh1
2 files changed, 295 insertions, 0 deletions
diff --git a/tools/gtk.suppression b/tools/gtk.suppression
new file mode 100644
index 0000000000..2cea334d10
--- /dev/null
+++ b/tools/gtk.suppression
@@ -0,0 +1,294 @@
+#
+# Valgrind suppression file for Gtk+ 2.12
+#
+# Format specification:
+# http://valgrind.org/docs/manual/manual-core.html#manual-core.suppress
+#
+
+#
+# glibc Ubuntu Edgy
+#
+
+{
+ libc: getpwnam_r
+ Memcheck:Addr4
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/tls/i686/cmov/libc-*.so
+ obj:/lib/ld-*.so
+ fun:__libc_dlopen_mode
+ fun:__nss_lookup_function
+ obj:/lib/tls/i686/cmov/libc-*.so
+ fun:__nss_passwd_lookup
+ fun:getpwnam_r
+ fun:g_get_any_init_do
+ fun:g_get_home_dir
+ fun:gtk_rc_add_initial_default_files
+ fun:_gtk_rc_init
+ fun:post_parse_hook
+ fun:g_option_context_parse
+ fun:gtk_parse_args
+ fun:gtk_init_check
+ fun:gtk_init
+}
+
+{
+ libc: getpwnam_r
+ Memcheck:Addr4
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/tls/i686/cmov/libc-*.so
+ obj:/lib/ld-*.so
+ fun:__libc_dlopen_mode
+ fun:__nss_lookup_function
+ obj:/lib/tls/i686/cmov/libc-*.so
+ fun:__nss_passwd_lookup
+ fun:getpwnam_r
+ fun:g_get_any_init_do
+ fun:g_get_home_dir
+ fun:gtk_rc_add_initial_default_files
+ fun:_gtk_rc_init
+ fun:post_parse_hook
+ fun:g_option_context_parse
+ fun:gtk_parse_args
+ fun:gtk_init_check
+ fun:gtk_init
+}
+
+{
+ libc: getpwnam_r
+ Memcheck:Addr4
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/tls/i686/cmov/libc-*.so
+ obj:/lib/ld-*.so
+ fun:__libc_dlopen_mode
+ fun:__nss_lookup_function
+ fun:__nss_next
+ fun:getpwnam_r
+ fun:g_get_any_init_do
+ fun:g_get_home_dir
+ fun:gtk_rc_add_initial_default_files
+ fun:_gtk_rc_init
+ fun:post_parse_hook
+ fun:g_option_context_parse
+ fun:gtk_parse_args
+ fun:gtk_init_check
+ fun:gtk_init
+}
+
+{
+ libc: getpwnam_r
+ Memcheck:Addr4
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/tls/i686/cmov/libc-*.so
+ obj:/lib/ld-*.so
+ fun:__libc_dlopen_mode
+ fun:__nss_lookup_function
+ fun:__nss_next
+ fun:getpwnam_r
+ fun:g_get_any_init_do
+ fun:g_get_home_dir
+ fun:gtk_rc_add_initial_default_files
+ fun:_gtk_rc_init
+ fun:post_parse_hook
+ fun:g_option_context_parse
+ fun:gtk_parse_args
+ fun:gtk_init_check
+ fun:gtk_init
+}
+
+#
+# glibc Ubuntu feisty
+#
+
+{
+ getpwnam_r
+ Memcheck:Leak
+ fun:malloc
+ obj:/lib/libc-2.5.so
+ fun:__nss_database_lookup
+ obj:*
+ obj:*
+ fun:getpwnam_r
+}
+
+#
+# X
+#
+
+{
+ XSupportsLocale
+ Memcheck:Addr4
+ obj:/lib/ld-*.so
+ obj:/lib/tls/i686/cmov/libdl-*.so
+ obj:/lib/ld-*.so
+ obj:/lib/tls/i686/cmov/libdl-*.so
+ fun:dlopen
+ obj:/usr/lib/libX11.so.6.2.0
+ fun:_XlcDynamicLoad
+ fun:_XOpenLC
+ fun:_XlcCurrentLC
+ fun:XSupportsLocale
+ fun:_gdk_x11_initialize_locale
+ fun:_gdk_windowing_init
+ fun:gdk_pre_parse_libgtk_only
+ fun:pre_parse_hook
+ fun:g_option_context_parse
+ fun:gtk_parse_args
+ fun:gtk_init_check
+ fun:gtk_init
+ fun:main
+}
+
+
+{
+ Xcursor
+ Memcheck:Leak
+ fun:malloc
+ obj:/usr/lib/libXcursor.so.1.0.2
+ obj:/usr/lib/libXcursor.so.1.0.2
+ fun:XcursorXcFileLoadImages
+ fun:XcursorFileLoadImages
+ fun:XcursorLibraryLoadImages
+ fun:XcursorShapeLoadImages
+ fun:XcursorTryShapeCursor
+ fun:XCreateGlyphCursor
+ fun:XCreateFontCursor
+ fun:gdk_cursor_new_for_display
+}
+
+{
+ XcursorGetTheme
+ Memcheck:Leak
+ fun:malloc
+ fun:/usr/lib/libX11.so.6.2.0
+ fun:/usr/lib/libX11.so.6.2.0
+ fun:XrmGetStringDatabase
+ fun:XGetDefault
+ fun:_XcursorGetDisplayInfo
+ fun:XcursorGetTheme
+}
+
+{
+ XOpenDisplay
+ Memcheck:Leak
+ fun:calloc
+ fun:XOpenDisplay
+}
+
+{
+ XOpenDisplay
+ Memcheck:Leak
+ fun:malloc
+ fun:XOpenDisplay
+}
+
+#
+# fontconfig
+#
+
+{
+ fontconfig
+ Memcheck:Leak
+ fun:realloc
+ fun:FcPatternObjectInsertElt
+ fun:FcPatternObjectAddWithBinding
+}
+
+{
+ pango_fc_font_map_load_fontset
+ Memcheck:Leak
+ fun:malloc
+ fun:FcLangSetCreate
+ fun:FcLangSetCopy
+ fun:FcValueSave
+ fun:FcPatternObjectAddWithBinding
+ fun:FcPatternObjectAdd
+ fun:FcFontRenderPrepare
+ fun:pango_fc_font_map_load_fontset
+ fun:pango_font_map_load_fontset
+}
+
+{
+ pango_font_map_load_fontset
+ Memcheck:Leak
+ fun:malloc
+ fun:FcPatternObjectAddWithBinding
+ fun:FcPatternObjectAdd
+ fun:FcFontRenderPrepare
+ fun:pango_fc_font_map_load_fontset
+ fun:pango_font_map_load_fontset
+}
+
+{
+ pango_fc_font_map_load_fontset
+ Memcheck:Leak
+ fun:malloc
+ fun:FcStrStaticName
+ fun:FcPatternObjectAddWithBinding
+ fun:FcPatternObjectAdd
+ fun:FcFontRenderPrepare
+ fun:pango_fc_font_map_load_fontset
+}
+
+{
+ pango_fc_font_map_list_families
+ Memcheck:Leak
+ fun:malloc
+ fun:FcStrStaticName
+ fun:FcPatternObjectAddWithBinding
+ fun:FcPatternAdd
+ fun:FcFontSetList
+ fun:FcFontList
+ fun:pango_fc_font_map_list_families
+}
+
+#
+# freetype
+#
+
+{
+ freetype FT_Init_FreeType
+ Memcheck:Leak
+ fun:malloc
+ obj:/usr/lib/libfreetype.so.6.3.10
+ fun:ft_mem_qalloc
+ fun:ft_mem_alloc
+ fun:FT_New_Library
+ fun:FT_Init_FreeType
+}
+
+#
+# glib
+#
+
+{
+ glib g_rand_new
+ Memcheck:Leak
+ fun:calloc
+ fun:g_malloc0
+ fun:g_rand_new_with_seed_array
+ fun:g_rand_new
+ fun:g_random_int
+}
diff --git a/tools/valgrind-wireshark.sh b/tools/valgrind-wireshark.sh
index e143a83601..8328370183 100755
--- a/tools/valgrind-wireshark.sh
+++ b/tools/valgrind-wireshark.sh
@@ -131,6 +131,7 @@ else
fi
cmdline="$LIBTOOL valgrind --suppressions=`dirname $0`/vg-suppressions $ADDITIONAL_SUPPRESSION_FILE \
+--suppressions=`dirname $0`/gtk.suppression \
--tool=$TOOL $CALLGRIND_OUT_FILE $VERBOSE $LEAK_CHECK $REACHABLE $GEN_SUPPRESSIONS $TRACK_ORIGINS \
$COMMAND $COMMAND_ARGS $PCAP $COMMAND_ARGS2"