pidgin: dd8c900c: Add PURPLE_LEAKCHECK_HELP environment va...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Sat Jul 18 03:40:51 EDT 2009
-----------------------------------------------------------------
Revision: dd8c900c8b85b223167b7ed82229d53e8668f901
Ancestor: c276e3e40bea98e6a7a25bc928400a5d0c76e340
Author: darkrain42 at pidgin.im
Date: 2009-07-18T05:26:23
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/dd8c900c8b85b223167b7ed82229d53e8668f901
Modified files:
ChangeLog libpurple/plugin.c
ChangeLog:
Add PURPLE_LEAKCHECK_HELP environment variable. See ChangeLog.
-------------- next part --------------
============================================================
--- ChangeLog 54b84212be7bac9191b67a121953e509ab08274c
+++ ChangeLog 115e0396cc852b6aa3a06a1ca400a2f8596e826a
@@ -20,10 +20,16 @@ version 2.6.0 (??/??/2009):
PURPLE_GNUTLS_DEBUG environment variable, which is an integer between
0 and 9 (higher is more verbose). Higher values may reveal sensitive
information.
- * PURPLE_VERBOSE_DEBUG environment variable. Currently this is an "on" or
+ * PURPLE_VERBOSE_DEBUG environment variable. Currently, this is an "on" or
"off" variable. Set it to any value to turn it on and unset it to turn
it off. This will optionally be used to only show less useful debug
information on an as-needed basis.
+ * PURPLE_LEAKCHECK_HELP environment variable. Currently, this is an "on"
+ or "off" variable. Set it to any value to turn it on and unset it to
+ turn it off. This will be used to perform various actions that are
+ useful when running libpurple inside of Valgrind or similar programs.
+ Currently, it keeps plugins in memory, allowing Valgrind to perform
+ symbol resolution of leak traces at shutdown.
* Add support for receiving handwritten (ink) messages on MSN.
* Don't do IPv6 address lookups if the computer does not have an IPv6
address configured.
============================================================
--- libpurple/plugin.c 9c7219b10a3ae042c33b50f41ccc0191db77008b
+++ libpurple/plugin.c fd2ebc352a77045321cda5bb1cdcce1f914becd0
@@ -870,8 +870,16 @@ purple_plugin_destroy(PurplePlugin *plug
if (plugin->info != NULL && plugin->info->destroy != NULL)
plugin->info->destroy(plugin);
- if (plugin->handle != NULL)
- g_module_close(plugin->handle);
+ /*
+ * I find it extremely useful to do this when using valgrind, as
+ * it keeps all the plugins open, meaning that valgrind is able to
+ * resolve symbol names in leak traces from plugins.
+ */
+ if (!g_getenv("PURPLE_LEAKCHECK_HELP"))
+ {
+ if (plugin->handle != NULL)
+ g_module_close(plugin->handle);
+ }
}
else
{
More information about the Commits
mailing list