[QUICK] talloc bugs

simo idra at samba.org
Wed Jul 1 11:20:49 GMT 2009

On Wed, 2009-07-01 at 15:30 +1000, tridge at samba.org wrote:
> Hi Sam,
> I should also say that we can still revisit
> talloc_reference/talloc_free and look at other models. I think the
> commits I just made solve the problem, and they certainly remove the
> ambiguity so the main traps with using
> talloc_reference/talloc_free/talloc_steal are now gone.
> We could consider a more intrusive API change if someone can propose
> one that is a significant improvement over the minimal change I just
> made.

I've already replied to the commit, but I'll comment here as well.

I'd like to ask to revert the changes you committed.
Mainly because they totally break the ABI, and upgrading talloc in
distributions would cause all applications that use it to fail.
This is just a technical issue, but it is extremely important.

The other issue is whether we should really post these incompatible
changes. Even if the API has not changed, now stuff that worked
perfectly fine will simply break at runtime.

I would really prefer to use a different way to solve the
talloc_reference() problem so that we do not break what depends on the
current model.

An idea could be to completely deprecate talloc_reference() and live it
there only for ABI/API compatibility requiring new apps to compile with
TALLOC_DEPRECATED, and use a new pair of functions
talloc_free() on an old talloc_reference() will not cause runtime
failures, but will in case of the new talloc_ref()

Please respond asap as Andrew Bartlet wanted to release a new samba4
alpha and breaking the ABI there would cause enormous amount of pain.


Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Principal Software Engineer at Red Hat, Inc. <simo at redhat.com>

More information about the samba-technical mailing list