[Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

Christophe Fergeau cfergeau at redhat.com
Thu Mar 29 08:05:32 UTC 2018


On Wed, Mar 28, 2018 at 05:54:21PM +0200, Christophe de Dinechin wrote:
> > With that said, I find the current "ODR" portion of the commit log
> > misleading, it's easy to get the impression that after this change, we
> > won't have any ODR problem anymore (this is what I initially thought!).
> 
> Why do you find it misleading?
> 
> The precise wording is "The current plugin version check violates the
> C++ ODR”. It specifically talks about “current plugin version check”.
> And there is indeed no ODR violation in the version check after that
> change.
> 
> Whether there are ODR violations elsewhere, and whether we accept such
> violations purposefully on a case by case basis for other calls is a
> judgement call. The mechanism makes it entirely possible to avoid ODR
> violations completely (at the cost of unnecessarily restricting binary
> compatibility).
> 
> So I don’t see it as misleading or implying that it magically gets rid
> of other ODR violations.

As long as we don't change the ABI, the version check is as much
an ODR violation as any other part of the code. Yet it's singled out
as an ODR violation that has to be fixed in the commit log. By reading
it, yes I kind of expect that we are no longer having similar violations
anywhere in the code, otherwise we would fix them too. Imo what really
matters here is that we need this check to detect ABI changes. which are
problematic from an ODR point of view, it's not the ODR violation by
itself. But it really is just a matter of wording.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180329/89214cc9/attachment.sig>


More information about the Spice-devel mailing list