On Wed, Nov 22, 2017 at 06:19:34PM +0100, Christophe Fergeau wrote: > On Wed, Nov 22, 2017 at 04:33:23PM +0100, Christophe de Dinechin wrote: > > From: Christophe de Dinechin <dinechin@xxxxxxxxxx> > > > > The C++ One Definition Rule (ODR) states that all translation units > > must see the same definitions. In the current code, when we call > > Agent::PluginVersionIsCompatible from the plugin, it is an ODR > > violation as soon as we have made any change in the Agent class > > compared to what the plugin was compiled against. > > > > GCC respects the Standard C++ ABI on most platforms, so I believe this > > could be made to work despite the violation as long as we never > > changed the order of declarations, etc. But the point of the ABI check > > is that we should be able to change the agent interface in any way we > > want and be safe. And technically, the safe cases would still be an > > ODR violation that relies on knowledge of implementation details. > > > > Another issue is that we don't want to have to rely on the plugins to > > do the version checks. It is more robust to do it in the agent, where > > it ensures that it is done in a consistent way and with consistent > > error messages. As a matter of fact, the new check is robust against > > older plugins and will not load them. > > > > The mechanism implemented here is similar to what libtool uses. > > It lets any interface update be marked as either compatible with > > earlier plugins or incompatible. > > I don't think fixing that issue with Agent::PluginVersionIsCompatible > requires switching to that libtool ABI versioning, does it? In other > word, do these 2 changes (a bug fix, and a functional change) have to go > in the same commit? Oh, and just realized that the log does not have any explanation of how you fixed this bug, nor how the suggested versioning works. Christophe
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel