[QUICK] talloc bugs

Jeremy Allison jra at samba.org
Wed Jul 1 21:40:23 GMT 2009


On Wed, Jul 01, 2009 at 09:08:15PM +0200, Stefan (metze) Metzmacher wrote:
> I agree to this!
> 
> If all we need is to keep the external symbols intact, then maybe this
> is all we need:
> 
> diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
> index e68b653..0109123 100644
> --- a/lib/talloc/talloc.c
> +++ b/lib/talloc/talloc.c
> @@ -1865,3 +1865,17 @@ int talloc_is_parent(const void *context, const
> void *ptr)
>         }
>         return 0;
>  }
> +
> +#undef talloc_free
> +int talloc_free(void *ptr)
> +{
> +       return _talloc_free(ptr, __location__": compat talloc_free()");
> +}
> +
> +#undef talloc_reference
> +void *talloc_reference(const void *context, const void *ptr)
> +{
> +       return _talloc_reference(context, ptr,
> +                    __location__": compat talloc_reference()");
> +}
> +
> 
> But this would only allow application build against an old version
> to work with the new version at runtime, but not the other way arround
> because the old library is missing the new _talloc_free() and
> _talloc_reference() symbols.

So isn't that where we bump the minor .so number, so
that apps built against the newer library are known
not to work with the older lib, but older apps will
still keep working with the bugfixed lib ?

Jeremy.


More information about the samba-technical mailing list