libndr 4.0 issues.
Michael Tokarev
mjt at tls.msk.ru
Tue Jan 30 11:09:35 UTC 2024
30.01.2024 13:04, Michael Tokarev via samba-technical:
...
> Now, the "right but not exactly trivial" way would be to actually use
> the symbol versioning mechanism. It is not a black magic, it's actually
> quite simple once you understand how it works. So that will be the same
> set of (wrapper/compat) functions but done in a stright-forward, clean
> way, without hackish re-#defines. You write ndr_size_string_v3(uint32)
> which just call new ndr_size_string(uint64), and mark the v3 one in the
> ld script (or right in the code) as belonging to the previous version.
> Having ABI/*.syms files makes it easy to implement proper symbol versioning,
> but this has to be done (so at least some python/waf code needs to be
> written), and done in a way to be at least somewhat compatible with
> the before-versioned symbols - that means, at least on per-library basis,
> after ABI bumping.
Samba does use some form of symbol versioning already, so there's no
conversion needed. But it does not allow for multiple versions of the
same symbol, and the versioning itself is done a bit wrong. Namely,
current wafsamba only looks when the given symbol appeared, not when
it changed. For example, when a program uses one of the changed in v4
symbols, such as that same ndr_size_string(), it gets linked with
ndr_size_string at NDR_0.0.1 (it was ndr version 0.0.1 when this symbol
first appeared), instead of the correct-by-now ndr_size_string at NDR_4.0.0,
since it's version 4.0.0 when this symbol with this signature first
appeared -- ndr_size_string at NDR_0.0.1 is not compatible with current
interface.
I just committed a change to debian bumping all changed symbols
minver to current:
https://salsa.debian.org/samba-team/samba/-/commit/b48cc627abb0ea1aa924de420419dcb2c21616dc
but this should be done in wafsamba using this @VER mechanism.
(and I missed similar changes in ldb before too, don't remember
the details already).
FWIW.
Thanks,
/mjt
More information about the samba-technical
mailing list