On Wed, 2008-04-23 at 21:16 +0930, Dan Shearer wrote:
> On Wed, Apr 23, 2008 at 01:19:57PM +0200, Volker Lendecke wrote:
> > On Wed, Apr 23, 2008 at 12:07:47PM +0200, Holger Kaelberer wrote:
> > > Do you have any experiences/suggestions about using valgrind on talloc -- in
> > > general, as well as regarding this particular case?

> >
> > Sure, we use it all the time, no problems here. Your
> > backtrace seems to indicate that you're using threads. I'm
> > pretty certain that talloc and threads don't particularly
> > like each other.

>
> I was just learning today about talloc not always being threadsafe.


Talloc is not thread safe in the sense that you cannot share the same
talloc context between multiple threads.

A talloc context that is used only in one thread is fine.

Making talloc thread safe isn't be difficult (just a matter of adding a
few locks here and there), but it will make talloc slower.

Simo.

--
Simo Sorce
Samba Team GPL Compliance Officer
Senior Software Engineer at Red Hat Inc.