[PATCH] Make loadparm more common

Jeremy Allison jra at samba.org
Thu Apr 3 10:34:02 MDT 2014


On Thu, Apr 03, 2014 at 01:45:47PM +0200, David Disseldorp wrote:
> On Wed, 2 Apr 2014 10:18:10 +0200, Michael Adam wrote:
> 
> > > > No, I'm not willing to add any more talloc_tos() to this area of the
> > > > code.  Almost all the odd unexpected failures caused by this patch set
> > > > were due to new talloc_tos() calls, because not all callers had a
> > > > talloc_stackframe().    
> > 
> > Well, those is a bug then, and the developer mode to panic
> > in that case was introduced so that we can fix the callers up.
> > 
> > I think adding talloc_tos() is way better than adding talloc(NULL,...)
> > since this way we can at least easily spot the leaks.
> 
> I disagree. IMO tallocations on the null context are much more readable
> and debugable. For talloc_tos() tallocations one needs to consider
> whether a stackframe is around, and when the next garbage collection
> could take place.

NULL talloc context allocations are utterly thread-unsafe,
that's my problem with them.

Now I know we don't do much with threads, but we do need
to get there eventually.. :-).

Jeremy.


More information about the samba-technical mailing list