From a605be73148ae0979c14263be1f969700f7055f6 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 28 Nov 2007 13:43:31 +0100 Subject: Add a warning for a potential bug I've run into (This used to be commit 223352e32372f1b055298cfc6f2770043a845e3d) --- source3/lib/tdb/common/traverse.c | 3 +++ source3/lib/tdb/docs/README | 3 +++ 2 files changed, 6 insertions(+) (limited to 'source3') diff --git a/source3/lib/tdb/common/traverse.c b/source3/lib/tdb/common/traverse.c index 6fc576a55a..27b2cfc54a 100644 --- a/source3/lib/tdb/common/traverse.c +++ b/source3/lib/tdb/common/traverse.c @@ -223,6 +223,9 @@ int tdb_traverse_read(struct tdb_context *tdb, /* a write style traverse - needs to get the transaction lock to prevent deadlocks + + WARNING: The data buffer given to the callback fn does NOT meet the + alignment restrictions malloc gives you. */ int tdb_traverse(struct tdb_context *tdb, tdb_traverse_func fn, void *private_data) diff --git a/source3/lib/tdb/docs/README b/source3/lib/tdb/docs/README index b31ce36ab1..63fcf5e049 100644 --- a/source3/lib/tdb/docs/README +++ b/source3/lib/tdb/docs/README @@ -130,6 +130,9 @@ int tdb_traverse(TDB_CONTEXT *tdb, int (*fn)(TDB_CONTEXT *tdb, a non-zero return value from fn() indicates that the traversal should stop. Traversal callbacks may not start transactions. + WARNING: The data buffer given to the callback fn does NOT meet the + alignment restrictions malloc gives you. + ---------------------------------------------------------------------- int tdb_traverse_read(TDB_CONTEXT *tdb, int (*fn)(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, void *state), void *state); -- cgit