[QUICK] talloc bugs

simo idra at samba.org
Wed Jul 1 21:46:02 GMT 2009


On Wed, 2009-07-01 at 14:40 -0700, Jeremy Allison wrote:
> 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 ?

yep, we bump up the version by a minor in configure.ac every time we add
a feature or we fix a nasty bug. For minor bugs we wait until release
time instead, but raising the minor is never a problem.

Btw, in linux the minor on the lib is also not that interesting, the
package carry the number too and you can set dependencies on the
packages, that is the preferred way to deal with this kind of
dependencies.

Simo.

-- 
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