the sorry saga of the talloc soname 'fix'

Stefan (metze) Metzmacher metze at samba.org
Mon Jul 6 09:18:07 GMT 2009


Andrew Bartlett schrieb:
> On Sat, 2009-07-04 at 11:24 +1000, tridge at samba.org wrote:
>> Hi Jeremy and Simo,
>>
>>  > Thanks a *lot* for this one Simo, much appreciated.
>>
>> I'm finding all this congratulation rather disturbing. The patch from
>> Simo now creates the very problem you are all so keen to avoid.
>>
>> With the soname bump we had lots of standard mechanisms in place (both
>> packaging and loader) to try to stop having two versions of the
>> library in place at the same time. It would be detected at package
>> install time, and also at runtime by Metze's patch.
> 
>> As for avoiding this with symbol versioning, that's all well and good
>> on platforms that have symbol versioning, but many of the platforms
>> that we claim we support don't have that, so now we've left them out
>> in the cold.
> 
> Why are we even trying to provide and use 'Samba' shared libraries on
> systems without symbol versions?  
> 
> (And yes, I'm aware that systems without GNU ld can't use them, but
> given that Samba libraries such as talloc are meant to be a 'value add'
> - not the fundamental purpose of the project, we should be able to set
> the rules about where we support them to the places where we can do so
> with sanity). 

I'd support to go that road and only support shared libraries when we
have and use symbol versioning. (But that should be a different discussion).

But as talloc is a memory mange library, it's a risk to have two
versions loaded at the same time, the same as if you would load 2
versions of glibc.

There're cases where there's no risk, like in the libwbclient library
where the public api doesn't expose talloc pointers being used,
as we have a wbcFreeMemory() function. Here the libwbclient internal
could use one version of talloc and callers could use a different version.

Even with symbol versioning, we would need to make sure we only
load one version of talloc, if a library exposes talloc pointers
in the public api, libtevent and other's do this. In this case we need
to make sure that the library and its caller use the same version of talloc.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.samba.org/archive/samba-technical/attachments/20090706/d18eec34/signature.bin


More information about the samba-technical mailing list