summaryrefslogtreecommitdiff
path: root/source3/tdb
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2003-03-11 07:23:43 +0000
committerMartin Pool <mbp@samba.org>2003-03-11 07:23:43 +0000
commit6f7ac2dcab02a0babf4c18e6fe1d1697943bddfc (patch)
treea66ba81a1b51b98d441e5d85962e71e58f12ab65 /source3/tdb
parent538c832ba147caa4c5f66439022ecb11ee2e5335 (diff)
downloadsamba-6f7ac2dcab02a0babf4c18e6fe1d1697943bddfc.tar.gz
samba-6f7ac2dcab02a0babf4c18e6fe1d1697943bddfc.tar.bz2
samba-6f7ac2dcab02a0babf4c18e6fe1d1697943bddfc.zip
Note about using Valgrind with tdbs.
(This used to be commit 36c6f67d4af50d8fc4c8bd54486df315861d55c2)
Diffstat (limited to 'source3/tdb')
-rw-r--r--source3/tdb/tdb.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c
index 0ec770ed81..ab50f40ef6 100644
--- a/source3/tdb/tdb.c
+++ b/source3/tdb/tdb.c
@@ -20,6 +20,27 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+
+
+/* NOTE: If you use tdbs under valgrind, and in particular if you run
+ * tdbtorture, you may get spurious "uninitialized value" warnings. I
+ * think this is because valgrind doesn't understand that the mmap'd
+ * area may be written to by other processes. Memory can, from the
+ * point of view of the grinded process, spontaneously become
+ * initialized.
+ *
+ * I can think of a few solutions. [mbp 20030311]
+ *
+ * 1 - Write suppressions for Valgrind so that it doesn't complain
+ * about this. Probably the most reasonable but people need to
+ * remember to use them.
+ *
+ * 2 - Use IO not mmap when running under valgrind. Not so nice.
+ *
+ * 3 - Use the special valgrind macros to mark memory as valid at the
+ * right time. Probably too hard -- the process just doesn't know.
+ */
+
#ifdef STANDALONE
#if HAVE_CONFIG_H
#include <config.h>