[Patches] Preparation for tevent impersonation (part1)

David Disseldorp ddiss at samba.org
Thu Jun 14 21:54:50 UTC 2018


On Thu, 14 Jun 2018 20:37:37 +0200, Volker Lendecke wrote:

> > Talloc stackframe handling is broken in many of places, unfortunately.
> > Continuing to use it for event based async code will only lead to more
> > problems in future IMO.  
> 
> What do you propose instead?

In most async cases we already have a memory context for the request
state, which makes a perfectly adequate parent for short-lived
tallocations. It may mean passing mem_ctx arguments around a bit more,
but is IMO far less error prone and easier to follow compared to random
usage of the talloc_tos() global and subsequent garbage collection.

Cheers, David



More information about the samba-technical mailing list