the sorry saga of the talloc soname 'fix'

Sam Liddicott sam at
Wed Jul 8 09:30:56 GMT 2009

* Michael Adam wrote, On 08/07/09 10:17:
> Sam Liddicott wrote:
>> * Michael Adam wrote, On 08/07/09 09:42:
>>> The remedy for all our problems is to just get rid of
>>> talloc_reference/talloc_unreference, the source of all
>>> evil and grief.
>>> Frankly, I personally can't imagine why one would use them at all...
>> Excellent a joke!
>> (for the humour impaired, talloc_reference was added for a reason. I
>> make heavy use of it, hence I'm the one providing the fix to unite
>> talloc_reference with talloc_free).
> In fact, I am not joking. :-)
> talloc_(un)reference turns the neat, simple tree of memory
> allocations into a graph with cycles and whatnot. This is
> the origin of the problems we are currently discussing.
> And I really think that this additional complexity is avoidable.
The additional complexity can be managed quite simply (won't someone
please ready my solution instead of just arguing about whether or not
there is a real problem). We can even solve the cycles problem, I have
talked about it, but if no-one will read this solution there's no point
in talking about the solution to the cycles.
> Maybe this is due to the fact that I have up to now mainly worked
> on the samba3 codebase where there is virtually no use of
> talloc_reference, as opposed to samba4 which makes rather heavy
> use of talloc_reference. I myself have never used it and I have
> never felt the need to do so.
> And given the problems that this creates, I really cannot see
> why one would not try to avoid using talloc_reference by all
> means (only because of sheer laziness.. ;-).

Of course you can't see why, because as you say you don't use it.

> Sam, please excuse my ignorance, can you give me an example of a
> situation that you could not have solved without talloc_reference?
Isn't the fact that I've debugged the problem, the fact that I've
written the patches AND the test cases AND tried for around 8 months to
have someone pay attention to this enough for you to take me seriously?

Now, rather than have the fix reviewed, I'm to have a critical review of
my code by people who don't use or need to use talloc_reference to see
if I could possibly have worked around this feature that the talloc API

Why not just look at the fix? I'm using it, I have the benefitd, I'm
trying one more time to give it to Samba because could ALSO solves the
immediate soname bumping issue.

[I predict that someone will now talk about this rather than about the
actual value of the suggested fix]


More information about the samba-technical mailing list