[ohm] ohm: Branch 'master' - 5 commits

Rob Taylor robtaylor at kemper.freedesktop.org
Sat Aug 4 04:07:43 PDT 2007


 ohmd/ohm-keystore.c                 |   24 -
 ohmd/ohm-manager.c                  |   31 +
 ohmd/ohm-module.c                   |   41 -
 ohmd/ohm-plugin.c                   |    7 
 ohmd/run-ohm.sh                     |    8 
 ohmd/valgrind.supp                  |  754 ++++++++++++++++++++++++++++++++++++
 plugins/glue/idle/ohm-plugin-idle.c |    5 
 7 files changed, 832 insertions(+), 38 deletions(-)

New commits:
diff-tree b211852191334c1cb764970bbde09a0fc389bfce (from 52fd5092e577d917540321321c8140569614eb3d)
Author: Rob Taylor <rob.taylor at codethink.co.uk>
Date:   Sat Aug 4 12:08:21 2007 +0100

    fix valgrind warnings in OhmPlugin
    
    Actually free the libhal context if allocated.
    
    Unload the module at the end - we can assume that OhmModule isn't holding onto any data by the time it unloads the plugin.

diff --git a/ohmd/ohm-plugin.c b/ohmd/ohm-plugin.c
index 9edf003..37db8e1 100644
--- a/ohmd/ohm-plugin.c
+++ b/ohmd/ohm-plugin.c
@@ -416,6 +416,7 @@ ohm_plugin_finalize (GObject *object)
 	OhmPlugin *plugin;
 	g_return_if_fail (object != NULL);
 	g_return_if_fail (OHM_IS_PLUGIN (object));
+
 	plugin = OHM_PLUGIN (object);
 
 	g_object_unref (plugin->priv->conf);
@@ -428,6 +429,7 @@ ohm_plugin_finalize (GObject *object)
 		if (plugin->priv->hal_ctx != NULL) {
 			ohm_plugin_free_hal_table (plugin);
 			libhal_ctx_shutdown (plugin->priv->hal_ctx, NULL);
+			libhal_ctx_free (plugin->priv->hal_ctx);
 		}
 		
 	}
@@ -436,7 +438,10 @@ ohm_plugin_finalize (GObject *object)
 		g_free (plugin->priv->name);
 	}
 	g_ptr_array_free (plugin->priv->hal_udis, TRUE);
-	g_return_if_fail (plugin->priv != NULL);
+
+	g_debug ("g_module_close(%p)", plugin->priv->handle);
+	g_module_close (plugin->priv->handle);
+
 	G_OBJECT_CLASS (ohm_plugin_parent_class)->finalize (object);
 }
 
diff-tree 52fd5092e577d917540321321c8140569614eb3d (from 836b28b43070e1e4600245f8e95fe315ab27bd15)
Author: Rob Taylor <rob.taylor at codethink.co.uk>
Date:   Sat Aug 4 12:06:11 2007 +0100

    unref owned objects in dispose, not finalize
    
    Modified ohm-keystore and ohm-manager to unref owned objects in dispose, not finalize.

diff --git a/ohmd/ohm-keystore.c b/ohmd/ohm-keystore.c
index 0e5421e..f680a83 100644
--- a/ohmd/ohm-keystore.c
+++ b/ohmd/ohm-keystore.c
@@ -137,10 +137,10 @@ ohm_keystore_get_keys (OhmKeystore *keys
 }
 
 /**
- * ohm_keystore_finalize:
+ * ohm_keystore_dispose:
  **/
 static void
-ohm_keystore_finalize (GObject *object)
+ohm_keystore_dispose (GObject *object)
 {
 	OhmKeystore *keystore;
 	g_return_if_fail (object != NULL);
@@ -149,10 +149,25 @@ ohm_keystore_finalize (GObject *object)
 
 	g_object_unref (keystore->priv->conf);
 
-	g_return_if_fail (keystore->priv != NULL);
+	G_OBJECT_CLASS (ohm_keystore_parent_class)->dispose (object);
+}
+
+/**
+ * ohm_keystore_finalize:
+ **/
+static void
+ohm_keystore_finalize (GObject *object)
+{
+	OhmKeystore *keystore;
+	g_return_if_fail (object != NULL);
+	g_return_if_fail (OHM_IS_KEYSTORE (object));
+	keystore = OHM_KEYSTORE (object);
+
+	g_debug ("Finalizing ohm-keystore");
 	G_OBJECT_CLASS (ohm_keystore_parent_class)->finalize (object);
 }
 
+
 /**
  * ohm_keystore_class_init:
  **/
@@ -160,7 +175,8 @@ static void
 ohm_keystore_class_init (OhmKeystoreClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	object_class->finalize	   = ohm_keystore_finalize;
+	object_class->finalize	= ohm_keystore_finalize;
+	object_class->dispose	= ohm_keystore_dispose;
 
 	signals [KEY_CHANGED] =
 		g_signal_new ("key-changed",
diff --git a/ohmd/ohm-manager.c b/ohmd/ohm-manager.c
index fcbdc77..df52384 100644
--- a/ohmd/ohm-manager.c
+++ b/ohmd/ohm-manager.c
@@ -48,6 +48,7 @@
 
 static void     ohm_manager_class_init	(OhmManagerClass *klass);
 static void     ohm_manager_init	(OhmManager      *manager);
+static void     ohm_manager_dispose	(GObject	 *object);
 static void     ohm_manager_finalize	(GObject	 *object);
 
 #define OHM_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), OHM_TYPE_MANAGER, OhmManagerPrivate))
@@ -132,7 +133,8 @@ ohm_manager_class_init (OhmManagerClass 
 {
 	GObjectClass   *object_class = G_OBJECT_CLASS (klass);
 
-	object_class->finalize	   = ohm_manager_finalize;
+	object_class->finalize	= ohm_manager_finalize;
+	object_class->dispose	= ohm_manager_dispose;
 
 	signals [ON_AC_CHANGED] =
 		g_signal_new ("on-ac-changed",
@@ -180,13 +182,13 @@ ohm_manager_init (OhmManager *manager)
 }
 
 /**
- * ohm_manager_finalize:
- * @object: The object to finalize
+ * ohm_manager_dispose:
+ * @object: The object to dispose
  *
- * Finalise the manager, by unref'ing all the depending modules.
+ * unref all objects we're holding
  **/
 static void
-ohm_manager_finalize (GObject *object)
+ohm_manager_dispose (GObject *object)
 {
 	OhmManager *manager;
 
@@ -199,6 +201,25 @@ ohm_manager_finalize (GObject *object)
 	g_object_unref (manager->priv->keystore);
 	g_object_unref (manager->priv->conf);
 
+	G_OBJECT_CLASS (ohm_manager_parent_class)->dispose (object);
+}
+
+/**
+ * ohm_manager_finalize:
+ * @object: The object to finalize
+ *
+ * Finalise the manager
+ **/
+static void
+ohm_manager_finalize (GObject *object)
+{
+	OhmManager *manager;
+
+	g_return_if_fail (object != NULL);
+	g_return_if_fail (OHM_IS_MANAGER (object));
+	manager = OHM_MANAGER (object);
+
+	g_debug ("Finalizing ohm_manager");
 	G_OBJECT_CLASS (ohm_manager_parent_class)->finalize (object);
 }
 
diff-tree 836b28b43070e1e4600245f8e95fe315ab27bd15 (from a9b055d958d3c5b0fb8e9d4780dae672e65972d5)
Author: Rob Taylor <rob.taylor at codethink.co.uk>
Date:   Sat Aug 4 12:04:47 2007 +0100

    fix valgrind warnings in OhmModule
    
    Changes the 'interested' hash table to store a GList * in its key rather than GList **, saves a 4 byte alloc that valgrind complained about.
    
    Free up mod_loaded after plugin loading.

diff --git a/ohmd/ohm-module.c b/ohmd/ohm-module.c
index 9e04f82..926dad9 100644
--- a/ohmd/ohm-module.c
+++ b/ohmd/ohm-module.c
@@ -67,15 +67,17 @@ typedef struct {
 
 G_DEFINE_TYPE (OhmModule, ohm_module, G_TYPE_OBJECT)
 
-static void
-free_notify_list (GList *list)
+static gboolean
+free_notify_list (const gchar *key, GSList *list, gpointer userdata)
 {
-	GList *l;
+	GSList *l;
 
 	for (l=list; l != NULL; l=l->next) {
-		g_slice_free (OhmModuleNotify, list->data);
+		g_slice_free (OhmModuleNotify, l->data);
 	}
-	g_list_free (list);
+	g_slist_free (list);
+
+	return TRUE;
 }
 
 static void
@@ -84,7 +86,7 @@ key_changed_cb (OhmConf     *conf,
 		gint	     value,
 		OhmModule   *module)
 {
-	GSList **entry;
+	GSList *entry;
 	GSList *l;
 	OhmModuleNotify *notif;
 	const gchar *name;
@@ -101,7 +103,7 @@ key_changed_cb (OhmConf     *conf,
 
 	ohm_debug ("found watched key %s", key);
 	/* go thru the SList and notify each plugin */
-	for (l=*entry; l != NULL; l=l->next) {
+	for (l=entry; l != NULL; l=l->next) {
 		notif = (OhmModuleNotify *) l->data;
 		name = ohm_plugin_get_name (notif->plugin);
 		ohm_debug ("notify %s with id:%i", name, notif->id);
@@ -112,8 +114,7 @@ key_changed_cb (OhmConf     *conf,
 static void
 add_interesteds (OhmModule   *module, OhmPlugin   *plugin)
 {
-	GSList **entry;
-	GSList **l;
+	GSList *entry;
 	OhmModuleNotify *notif;
 	const OhmPluginKeyIdMap *interested;
 	
@@ -131,19 +132,8 @@ add_interesteds (OhmModule   *module, Oh
 		notif->plugin = plugin;
 		notif->id = interested->local_key_id;
 
-		if (entry != NULL) {
-			/* already present, just append to SList */
-			ohm_debug ("key already watched by someting else");
-			*entry = g_slist_prepend (*entry, (gpointer) notif);
-		} else {
-			ohm_debug ("key not already watched by something else");
-			/* create the new SList andd add the new notification to it */
-			l = g_new0 (GSList *, 1);
-			*l = NULL;
-			*l = g_slist_prepend (*l, (gpointer) notif);
-			/*dupping string to cope if module is removed*/
-			g_hash_table_insert (module->priv->interested, (gpointer) interested->key_name, l);
-		}
+		entry = g_slist_prepend (entry, (gpointer) notif);
+		g_hash_table_insert (module->priv->interested, (gpointer) interested->key_name, entry);
 	}
 }
 
@@ -378,6 +368,7 @@ ohm_module_finalize (GObject *object)
 	g_return_if_fail (OHM_IS_MODULE (object));
 	module = OHM_MODULE (object);
 
+	g_hash_table_foreach_remove (module->priv->interested, (GHRFunc) free_notify_list, NULL);
 	g_hash_table_destroy (module->priv->interested);
 	g_object_unref (module->priv->conf);
 
@@ -386,6 +377,7 @@ ohm_module_finalize (GObject *object)
 		plugin = (OhmPlugin *) l->data;
 		g_object_unref (plugin);
 	}
+	g_slist_free (module->priv->plugins);
 
 	g_return_if_fail (module->priv != NULL);
 	G_OBJECT_CLASS (ohm_module_parent_class)->finalize (object);
@@ -418,7 +410,7 @@ ohm_module_init (OhmModule *module)
 
 	module->priv = OHM_MODULE_GET_PRIVATE (module);
 
-	module->priv->interested = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, (GDestroyNotify)free_notify_list);
+	module->priv->interested = g_hash_table_new (g_str_hash, g_str_equal);
 
 	module->priv->conf = ohm_conf_new ();
 	g_signal_connect (module->priv->conf, "key-changed",
@@ -439,9 +431,10 @@ ohm_module_init (OhmModule *module)
 			g_error ("Module add too complex, please file a bug");
 		}
 	}
+	g_slist_free (module->priv->mod_prevent);
+	g_slist_free (module->priv->mod_loaded);
 	g_strfreev (module->priv->modules_required);
 	g_strfreev (module->priv->modules_suggested);
-	g_slist_free (module->priv->mod_prevent);
 	g_strfreev (module->priv->modules_banned);
 
 	/* add defaults for each plugin before the initialization*/
diff-tree a9b055d958d3c5b0fb8e9d4780dae672e65972d5 (from 7a6aeb73860ab47a724cc56d2da0722dbf500278)
Author: Rob Taylor <rob.taylor at codethink.co.uk>
Date:   Sat Aug 4 12:01:30 2007 +0100

    Fix crasher on destroy in plugin-idle
    
    Idle plugin was crashing on destroy if xorg.has_xauthority was 0 for the duration of its running.

diff --git a/plugins/glue/idle/ohm-plugin-idle.c b/plugins/glue/idle/ohm-plugin-idle.c
index 31de93c..2990f58 100644
--- a/plugins/glue/idle/ohm-plugin-idle.c
+++ b/plugins/glue/idle/ohm-plugin-idle.c
@@ -25,7 +25,7 @@
 #include <libidletime.h>
 #include <stdlib.h>
 
-static LibIdletime *idletime;
+static LibIdletime *idletime = NULL;
 
 enum {
 	CONF_XORG_HASXAUTH_CHANGED,
@@ -128,7 +128,8 @@ plugin_notify (OhmPlugin *plugin, gint i
 static void
 plugin_destroy (OhmPlugin *plugin)
 {
-	g_object_unref (idletime);
+	if (idletime)
+		g_object_unref (idletime);
 }
 
 OHM_PLUGIN_DESCRIPTION (
diff-tree 7a6aeb73860ab47a724cc56d2da0722dbf500278 (from 78a699b7aacccb9cea9316f9b79315499af83ff0)
Author: Rob Taylor <rob.taylor at codethink.co.uk>
Date:   Sat Aug 4 11:59:37 2007 +0100

    make run-ohm.sh's valgrind running more useful
    
    Switches off g_slice and run with a supression file.

diff --git a/ohmd/run-ohm.sh b/ohmd/run-ohm.sh
index 88d2e85..abf0385 100755
--- a/ohmd/run-ohm.sh
+++ b/ohmd/run-ohm.sh
@@ -32,16 +32,20 @@ if [ "$1" = "--debug" ] ; then
 	prefix="gdb --args"
 elif [ "$1" = "--memcheck" ] ; then
 	shift
-	prefix="valgrind --show-reachable=yes --leak-check=full --tool=memcheck"
+	prefix="valgrind --show-reachable=yes --leak-check=full --tool=memcheck --suppressions=./valgrind.supp $VALGRIND_EXTRA"
+	export G_SLICE="always-malloc"
 elif [ "$1" = "--massif" ] ; then
 	shift
-	prefix="valgrind --tool=massif"
+	prefix="valgrind --tool=massif --suppressions=./valgrind.supp $VALGRIND_EXTRA"
+	export G_SLICE="always-malloc"
 elif [ "$1" = "--efence" ] ; then
 	shift
 	prefix="gdb -x ./efence.gdb --args"
+	export G_SLICE="always-malloc"
 elif [ "$1" = "--underfence" ] ; then
 	shift
 	prefix="gdb -x ./underfence.gdb --args"
+	export G_SLICE="always-malloc"
 fi
 
 export OHM_CONF_DIR=$OHM_TMPDIR/etc/ohm
diff --git a/ohmd/valgrind.supp b/ohmd/valgrind.supp
new file mode 100644
index 0000000..1b02095
--- /dev/null
+++ b/ohmd/valgrind.supp
@@ -0,0 +1,754 @@
+### this file contains suppressions for valgrind when running
+### the gibber/telepathy-salut unit tests based on the gstreamer one
+
+### syscall suppressions
+
+{
+   <clone on Wim's Debian>
+   Memcheck:Param
+   clone(parent_tidptr)
+   fun:clone
+   fun:clone
+}
+
+{
+   <clone on Wim's Debian>
+   Memcheck:Param
+   clone(child_tidptr)
+   fun:clone
+   fun:clone
+}
+
+{
+   <clone on Wim's Debian>
+   Memcheck:Param
+   clone(tlsinfo)
+   fun:clone
+   fun:clone
+}
+
+### glibc suppressions
+
+{
+   <conditional jump on wim's debian 2/2/06>
+   Memcheck:Cond
+   obj:/lib/ld-2.3.*.so
+   fun:dl_open_worker
+   obj:/lib/ld-2.3.*.so
+   fun:_dl_open
+   fun:dlopen_doit
+   obj:/lib/ld-2.3.*.so
+   fun:_dlerror_run
+   fun:dlopen@@GLIBC_2.1
+   fun:g_module_open
+}
+
+# glibc does not deallocate thread-local storage
+
+{
+   <tls>
+   Memcheck:Leak
+   fun:calloc
+   fun:_dl_allocate_tls
+   fun:pthread_create@@*
+}
+
+# I get an extra stack entry on x86/dapper
+{
+   <tls>
+   Memcheck:Leak
+   fun:calloc
+   obj:/lib/ld-2.3.*.so
+   fun:_dl_allocate_tls
+   fun:pthread_create@@*
+}
+
+
+{
+   <pthread strstr>
+   Memcheck:Cond
+   fun:strstr
+   fun:__pthread_initialize_minimal
+   obj:/lib/libpthread-*.so
+   obj:/lib/libpthread-*.so
+   fun:call_init
+   fun:_dl_init
+   obj:/lib/ld-*.so
+}
+
+# a thread-related free problem in glibc from Edgard
+{
+   __libc_freeres_rw_acess
+   Memcheck:Addr4
+   obj:*
+   obj:*
+   obj:*
+   obj:*
+   obj:*
+   fun:__libc_freeres
+}
+
+{
+   <a conditional jump on wim's debian>
+   Memcheck:Cond
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+}
+
+# g_module_open-related problems
+{
+   <started showing up on fc4-quick>
+   Memcheck:Addr2
+   fun:memcpy
+   fun:_dl_map_object_deps
+   fun:dl_open_worker
+   fun:_dl_catch_error
+   fun:_dl_open
+   fun:dlopen_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlopen@@GLIBC_2.1
+   fun:g_module_open
+}
+
+{
+   <started showing up on fc4-quick>
+   Memcheck:Addr4
+   fun:memcpy
+   fun:_dl_map_object_deps
+   fun:dl_open_worker
+   fun:_dl_catch_error
+   fun:_dl_open
+   fun:dlopen_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlopen@@GLIBC_2.1
+   fun:g_module_open
+}
+
+{
+   <g_module_open on wim's debian>
+   Memcheck:Cond
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   fun:do_sym
+   fun:_dl_sym
+   fun:dlsym_doit
+   obj:/lib/ld-2.3.*.so
+   fun:_dlerror_run
+   fun:dlsym
+   fun:g_module_symbol
+   fun:g_module_open
+}
+
+{
+   <g_module_open on wim's debian>
+   Memcheck:Cond
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   fun:dl_open_worker
+   obj:/lib/ld-2.3.*.so
+   fun:_dl_open
+   fun:dlopen_doit
+   obj:/lib/ld-2.3.*.so
+   fun:_dlerror_run
+   fun:dlopen@@GLIBC_2.1
+   fun:g_module_open
+}
+{
+   <g_module_open on wim's debian>
+   Memcheck:Cond
+   obj:/lib/ld-2.3.*.so
+   fun:dl_open_worker
+   obj:/lib/ld-2.3.*.so
+   fun:_dl_open
+   fun:dlopen_doit
+   obj:/lib/ld-2.3.*.so
+   fun:_dlerror_run
+   fun:dlopen@@GLIBC_2.1
+   fun:g_module_open
+}
+
+{
+   <leak on wim's debian in g_module_open>
+   Memcheck:Leak
+   fun:malloc
+   obj:/lib/ld-2.3.*.so
+   fun:dl_open_worker
+   obj:/lib/ld-2.3.*.so
+   fun:_dl_open
+   fun:dlopen_doit
+   obj:/lib/ld-2.3.*.so
+   fun:_dlerror_run
+   fun:dlopen@@GLIBC_2.1
+   fun:g_module_open
+}
+
+{
+   <invalid read on wim's debian>
+   Memcheck:Addr4
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   fun:dl_open_worker
+   obj:/lib/ld-2.3.*.so
+   fun:_dl_open
+   fun:dlopen_doit
+   obj:/lib/ld-2.3.*.so
+}
+
+{
+   <invalid read on wim's debian>
+   Memcheck:Addr4
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   fun:dl_open_worker
+   obj:/lib/ld-2.3.*.so
+   fun:_dl_open
+   fun:dlopen_doit
+   obj:/lib/ld-2.3.*.so
+   fun:_dlerror_run
+}
+
+{
+   <invalid read on wim's debian - 2006-02-02>
+   Memcheck:Addr4
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   fun:dl_open_worker
+   obj:/lib/ld-2.3.*.so
+   fun:_dl_open
+   fun:dlopen_doit
+   obj:/lib/ld-2.3.*.so
+   fun:_dlerror_run
+   fun:dlopen@@GLIBC_2.1
+   fun:g_module_open
+}
+
+{
+   <invalid read on wim's debian - 2006-02-02>
+   Memcheck:Addr4
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   fun:dl_open_worker
+   obj:/lib/ld-2.3.*.so
+   fun:_dl_open
+   fun:dlopen_doit
+   obj:/lib/ld-2.3.*.so
+   fun:_dlerror_run
+   fun:dlopen@@GLIBC_2.1
+   fun:g_module_open
+}
+
+{
+   <invalid read on wim's debian - 2006-02-02>
+   Memcheck:Addr4
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   fun:do_sym
+   fun:_dl_sym
+   fun:dlsym_doit
+   obj:/lib/ld-2.3.*.so
+   fun:_dlerror_run
+   fun:dlsym
+   fun:g_module_symbol
+   fun:g_module_open
+}
+
+{
+   <futex on Andy's 64-bit ubuntu>
+   Memcheck:Param
+   futex(uaddr2)
+   fun:pthread_once
+   obj:/lib/libc-2.3.*.so
+   obj:/lib/libc-2.3.*.so
+   fun:mbsnrtowcs
+   fun:vfprintf
+   fun:vsprintf
+   fun:sprintf
+   obj:/lib/libc-2.3.*.so
+}
+
+# valgrind doesn't allow me to specify a suppression for Addr1, Addr2, Addr4
+# as Addr*, so 3 copies for that; and then 2 of each for that pesky memcpy
+{
+   <Invalid read of size 1, 2, 4 on thomas's FC4>
+   Memcheck:Addr1
+   fun:_dl_signal_error
+   fun:_dl_map_object_deps
+   fun:dl_open_worker
+   fun:_dl_catch_error
+   fun:_dl_open
+   fun:dlopen_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlopen@@GLIBC_2.1
+   fun:g_module_open
+}
+
+{
+   <Invalid read of size 1, 2, 4 on thomas's FC4>
+   Memcheck:Addr2
+   fun:_dl_signal_error
+   fun:_dl_map_object_deps
+   fun:dl_open_worker
+   fun:_dl_catch_error
+   fun:_dl_open
+   fun:dlopen_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlopen@@GLIBC_2.1
+   fun:g_module_open
+}
+{
+   <Invalid read of size 1, 2, 4 on thomas's FC4>
+   Memcheck:Addr4
+   fun:_dl_signal_error
+   fun:_dl_map_object_deps
+   fun:dl_open_worker
+   fun:_dl_catch_error
+   fun:_dl_open
+   fun:dlopen_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlopen@@GLIBC_2.1
+   fun:g_module_open
+}
+
+{
+   <Invalid read of size 1, 2, 4 on thomas's FC4>
+   Memcheck:Addr1
+   fun:memcpy
+   fun:_dl_signal_error
+   fun:_dl_map_object_deps
+   fun:dl_open_worker
+   fun:_dl_catch_error
+   fun:_dl_open
+   fun:dlopen_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlopen@@GLIBC_2.1
+   fun:g_module_open
+}
+
+{
+   <Invalid read of size 1, 2, 4 on thomas's FC4>
+   Memcheck:Addr2
+   fun:memcpy
+   fun:_dl_signal_error
+   fun:_dl_map_object_deps
+   fun:dl_open_worker
+   fun:_dl_catch_error
+   fun:_dl_open
+   fun:dlopen_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlopen@@GLIBC_2.1
+   fun:g_module_open
+}
+{
+   <Invalid read of size 1, 2, 4 on thomas's FC4>
+   Memcheck:Addr4
+   fun:memcpy
+   fun:_dl_signal_error
+   fun:_dl_map_object_deps
+   fun:dl_open_worker
+   fun:_dl_catch_error
+   fun:_dl_open
+   fun:dlopen_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlopen@@GLIBC_2.1
+   fun:g_module_open
+}
+
+{
+   <Addr8 on Andy's AMD64 ubuntu in dl_open>
+   Memcheck:Addr8
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/libc-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   fun:_dl_open
+   obj:/lib/libdl-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+}
+
+{
+   <Conditional jump on Andy's AMD64 ubuntu>
+   Memcheck:Cond
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/libc-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   fun:_dl_open
+   obj:/lib/libdl-2.3.*.so
+   obj:/lib/ld-2.3.*.so
+   obj:/lib/libdl-2.3.*.so
+   fun:dlopen
+   fun:g_module_open
+}
+
+{
+   <Mike's x86 dapper>
+   Memcheck:Addr4
+   obj:/lib/ld-2.3.6.so
+   obj:/lib/ld-2.3.6.so
+   obj:/lib/tls/i686/cmov/libc-2.3.6.so
+   obj:/lib/ld-2.3.6.so
+   fun:_dl_open
+   obj:/lib/tls/i686/cmov/libdl-2.3.6.so
+   obj:/lib/ld-2.3.6.so
+   obj:/lib/tls/i686/cmov/libdl-2.3.6.so
+   fun:dlopen
+}
+
+{
+   <Mike's x86 dapper>
+   Memcheck:Cond
+   obj:/lib/ld-2.3.6.so
+   obj:/lib/tls/i686/cmov/libc-2.3.6.so
+   obj:/lib/ld-2.3.6.so
+   fun:_dl_open
+   obj:/lib/tls/i686/cmov/libdl-2.3.6.so
+   obj:/lib/ld-2.3.6.so
+   obj:/lib/tls/i686/cmov/libdl-2.3.6.so
+   fun:dlopen
+}
+
+{
+   <Another dapper one>
+   Memcheck:Cond
+   obj:/lib/ld-2.3.6.so
+   obj:/lib/ld-2.3.6.so
+   obj:/lib/ld-2.3.6.so
+   obj:/lib/tls/i686/cmov/libc-2.3.6.so
+   obj:/lib/ld-2.3.6.so
+   fun:_dl_open
+   obj:/lib/tls/i686/cmov/libdl-2.3.6.so
+   obj:/lib/ld-2.3.6.so
+   obj:/lib/tls/i686/cmov/libdl-2.3.6.so
+   fun:dlopen
+}
+
+### glib suppressions
+{
+   <g_parse_debug_string>
+   Memcheck:Cond
+   fun:g_parse_debug_string
+   obj:/usr/lib*/libglib-2.0.so.*
+   fun:g_slice_alloc
+   fun:g_slice_alloc0
+}
+
+{
+   <g_type_init malloc>
+   Memcheck:Leak
+   fun:malloc
+   fun:g_malloc
+   fun:g_strdup
+   fun:g_quark_from_string
+   obj:*
+   obj:*
+   fun:g_type_register_fundamental
+   obj:*
+   fun:g_type_init_with_debug_flags
+   fun:g_type_init
+}
+
+{
+   <g_type_init calloc>
+   Memcheck:Leak
+   fun:calloc
+   fun:g_malloc0
+   obj:*
+   obj:*
+   fun:g_type_register_fundamental
+}
+
+{
+   <g_type_init calloc 2>
+   Memcheck:Leak
+   fun:calloc
+   fun:g_malloc0
+   obj:*
+   obj:*
+   fun:g_type_init_with_debug_flags
+}
+
+{
+   <g_type_init calloc 3, GSlice version>
+   Memcheck:Leak
+   fun:calloc
+   fun:g_malloc0
+   fun:g_slice_alloc
+   obj:*
+   obj:*
+   fun:g_type_init_with_debug_flags
+}
+
+#pthread memleaks
+
+{
+   Thread creation leak
+   Memcheck:Leak
+   fun:calloc
+   fun:allocate_dtv
+   fun:_dl_allocate*
+   fun:_dl_allocate*
+   fun:__pthread_initialize_minimal
+}
+
+{
+   Thread management leak
+   Memcheck:Leak
+   fun:calloc
+   fun:allocate_dtv
+   fun:_dl_allocate*
+   fun:_dl_allocate*
+   fun:__pthread_*
+}
+
+{
+   Thread management leak 2
+   Memcheck:Leak
+   fun:memalign
+   fun:_dl_allocate*
+   fun:_dl_allocate*
+   fun:__pthread_*
+}
+
+{
+   pthread_create Syscall param write(buf) points to uninitialised byte(s)
+   Memcheck:Param
+   write(buf)
+   fun:pthread_create@@GLIBC_2.2.5
+   fun:g_thread_create*
+
+}
+
+# nss_parse_* memleak (used by g_option_context_parse)
+{
+   nss_parse_* memleak
+   Memcheck:Leak
+   fun:malloc
+   fun:nss_parse_service_list
+   fun:__nss_database_lookup
+}
+
+{
+   <annoying read error inside dlopen stuff on Ubuntu Dapper x86_64>
+   Memcheck:Addr8
+   obj:/lib/ld-2.3.6.so
+}
+
+{
+   <Ubuntu Dapper x86_64>
+   Memcheck:Param
+   futex(uaddr2)
+   fun:pthread_once
+   obj:/lib/libc-2.3.6.so
+   obj:/lib/libc-2.3.6.so
+   fun:setlocale
+   fun:init_pre
+   fun:g_option_context_parse
+}
+
+{
+   <Ubuntu Dapper x86_64 dlopen stuff again>
+   Memcheck:Cond
+   obj:/lib/ld-2.3.6.so
+   obj:/lib/ld-2.3.6.so
+   fun:_dl_open
+   obj:/lib/libdl-2.3.6.so
+   obj:/lib/ld-2.3.6.so
+   obj:/lib/libdl-2.3.6.so
+   fun:dlopen
+   fun:g_module_open
+}
+# this exists in a bunch of different variations, hence the short tail/trace
+{
+   <dlopen invalid read of size 4 suppression on tpm's Ubuntu edgy/x86>
+   Memcheck:Addr4
+   obj:/lib/ld-2.4.so
+   obj:/lib/ld-2.4.so
+}
+{
+   <and the same for 64bit systems>
+   Memcheck:Addr8
+   obj:/lib/ld-2.4.so
+   obj:/lib/ld-2.4.so
+}
+
+# More edgy suppressions (Mike)
+{  
+   <dlopen Condition jump suppressions for Ubuntu Edgy/x86>
+   Memcheck:Cond
+   obj:/lib/ld-2.4.so
+   obj:/lib/ld-2.4.so
+   obj:/lib/ld-2.4.so
+   obj:/lib/ld-2.4.so
+   fun:dlopen_doit
+   obj:/lib/ld-2.4.so
+   fun:_dlerror_run
+   fun:dlopen@@GLIBC_2.1
+}
+
+{  
+   <dlopen Condition jump suppressions for Ubuntu Edgy/x86>
+   Memcheck:Cond
+   obj:/lib/ld-2.4.so
+   obj:/lib/ld-2.4.so
+   obj:/lib/ld-2.4.so
+   obj:/lib/ld-2.4.so
+   obj:/lib/ld-2.4.so
+   obj:/lib/ld-2.4.so
+   fun:dlopen_doit
+   obj:/lib/ld-2.4.so
+   fun:_dlerror_run
+   fun:dlopen@@GLIBC_2.1
+}
+
+{  
+   <dlopen Condition jump suppressions for Ubuntu Edgy/x86>
+   Memcheck:Cond
+   obj:/lib/ld-2.4.so
+   obj:/lib/ld-2.4.so
+   obj:/lib/ld-2.4.so
+   fun:do_sym
+   fun:_dl_sym
+}
+
+# This one's overly general, but there's zero other information in the stack
+# trace - just these five lines!
+{  
+   <dlopen Condition jump suppressions for Ubuntu Edgy/x86>
+   Memcheck:Cond
+   obj:/lib/ld-2.4.so
+   obj:/lib/ld-2.4.so
+   obj:/lib/ld-2.4.so
+   obj:/lib/ld-2.4.so
+   obj:/lib/ld-2.4.so
+}
+
+{
+   <tls leaks on Edgy/x86>
+   Memcheck:Leak
+   fun:calloc
+   obj:/lib/ld-2.4.so
+   fun:_dl_allocate_tls
+   fun:pthread_create@@GLIBC_2.1
+}
+
+{
+   <libcdio 0.76 leak>
+   Memcheck:Leak
+   fun:calloc
+   obj:/usr/lib/libcdio.so.6.0.1
+   fun:cdio_open_am_linux
+   obj:/usr/lib/libcdio.so.6.0.1
+   fun:cdio_open_am
+}
+
+# TLS leaks for feisty/x86
+{
+   <tls leaks on Feisty/x86>
+   Memcheck:Leak
+   fun:calloc
+   fun:allocate_dtv
+   fun:_dl_allocate_tls
+   fun:pthread_create@@GLIBC_2.1
+}
+
+{
+   <Addr8 on Jan's AMD64 ubuntu Feisty in dl_open>
+   Memcheck:Addr8
+   obj:/lib/ld-2.5.so
+}
+
+{
+   <GLib caching the home dir>
+   Memcheck:Leak
+   fun:malloc
+   obj:/lib/libc-*.so
+   fun:__nss_database_lookup
+   obj:*
+   obj:*
+   fun:getpwnam_r
+   fun:g_get_any_init_do
+   fun:g_get_home_dir
+}
+{
+   <GLib caching the user name>
+   Memcheck:Leak
+   fun:malloc
+   obj:/lib/libc-*.so
+   fun:__nss_database_lookup
+   obj:*
+   obj:*
+   fun:getpwnam_r
+   fun:g_get_any_init_do
+   fun:g_get_user_name
+}
+
+{
+   <thread specific buffer in dlerror_run, Ubuntu Feisty>
+   Memcheck:Leak
+   fun:calloc
+   fun:_dlerror_run
+   fun:dlopen@@GLIBC_2.1
+}
+
+{
+   <addition to global symbol space, Ubuntu Feisty>
+   Memcheck:Leak
+   fun:realloc
+   fun:add_to_global
+   fun:dl_open_worker
+   fun:_dl_catch_error
+   fun:_dl_open
+   fun:dlopen_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlopen@@GLIBC_2.1
+}
+
+{
+   <gquark setup>
+   Memcheck:Leak
+   fun:malloc
+   fun:realloc
+   fun:g_realloc
+   fun:g_quark_from_static_string
+}
+
+{
+   <gtype setup>
+   Memcheck:Leak
+   fun:realloc
+   fun:g_realloc
+   fun:type_node_any_new_W
+   fun:type_node_new_W
+   fun:g_type_register_static
+}
+
+


More information about the Ohm-devel mailing list