Subject: [Boost-bugs] [Boost C++ Libraries] #4929: Another serialization version compatibility issue with binary archives
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-12-03 22:07:28
#4929: Another serialization version compatibility issue with binary archives
------------------------------------+---------------------------------------
Reporter: m_fedyszyn@⦠| Owner: ramey
Type: Patches | Status: new
Milestone: To Be Determined | Component: serialization
Version: Boost 1.45.0 | Severity: Problem
Keywords: version compatibility |
------------------------------------+---------------------------------------
Although the 1-byte / 2-byte library version bug has been resolved (Ticket
#4660), I've ran into several other problems of the same kind.
I have an archive created with boost 1.43 which can't load in 1.45. The
first problem occurs while loading the first object's preamble -
load_preamble() reads tracking level (as one byte) and a version (as 2
bytes, but within the file it is stored as one byte too). The difference
is caused by load_override() function for version_type which used char
type in 1.43, now it loads as uint_least16_t for archive version 7.
When I fixed this the next thing that failed was deserialization of
std::list. The load_collection() function loads item version. In 1.43 this
was fixed to unsigned int, in the current it is handled by load_override()
which for archive version 7 loads this as uint_least16_t, so it leads to
another misalignment. After I fixed those the old archive loads well. I've
prepared a patch for those, but I think it probably breaks 1.44 archives
using the same version 7.
There's another thing that worth mentioning - the boost serialization
library can be compiled into a static library. When linking an application
with that library, the resulting exe exports many library functions, which
is quite undesirable. I think the solution is to remove dllexport
declarations when building a static lib, the patch is attached.
Hope this helps.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4929> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC