diff options
author | Simon McVittie <smcv@debian.org> | 2013-02-22 15:16:57 +0000 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2013-02-22 15:16:57 +0000 |
commit | 4b6f5d684fc302b10fa2471597c0b276d8ef9885 (patch) | |
tree | c4a4be74363e8f2ba8eee27caea3428e2d5f4ab1 /README.valgrind | |
parent | e43c954015d881061d36afe6d1315517c90aeb43 (diff) | |
download | dbus-4b6f5d684fc302b10fa2471597c0b276d8ef9885.tar.gz |
Imported Upstream version 1.7.0upstream/1.7.0
Diffstat (limited to 'README.valgrind')
-rw-r--r-- | README.valgrind | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/README.valgrind b/README.valgrind new file mode 100644 index 00000000..c13f5304 --- /dev/null +++ b/README.valgrind @@ -0,0 +1,24 @@ +Running D-Bus clients with Valgrind +==== + +When running programs using libdbus in Valgrind, some special care needs to be +taken so as to avoid incorrect detection of leaks in libdbus. To avoid these +false positives, do the following: + +* Grab a copy of the D-Bus source code + +* Run configure with the --enable-developer and --with-valgrind options + +* Run make + +* Either make sure your code calls dbus_shutdown() (at least while running in + Valgrind) or set DBUS_MESSAGE_CACHE=0 in your environment + +* Run Valgrind on your program with the /path/to/dbus/source/dbus/.libs in your + LD_LIBRARY_PATH + +Your Valgrind log should now be free of any (spurious) libdbus-related leaks. + +For the curious, the DBUS_MESSAGE_CACHE=0 is required because by +default, libdbus uses a recyclable pool of message structs. These help +performance a bit. |