Re: [Boost-bugs] [Boost C++ Libraries] #4660: Error read binary archive, created by old boost version

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4660: Error read binary archive, created by old boost version
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-02-25 19:26:43


#4660: Error read binary archive, created by old boost version
---------------------------------------+------------------------------------
  Reporter: serge-voropaev@… | Owner: ramey
      Type: Bugs | Status: reopened
 Milestone: Boost 1.45.0 | Component: serialization
   Version: Boost 1.45.0 | Severity: Problem
Resolution: | Keywords:
---------------------------------------+------------------------------------

Comment (by markus.henschel@…):

 After digging even deeper into the matter and creating the promised patch
 I have good news. If I'm not mistaken the patch fixes compatibility of
 binary archives created by all versions. Even 1.42, 1.43 and 1.44 should
 work. There already was code that could detect if the archive version was
 1 or 2 bytes. This made it possible to differentiate between 1.43 (1 byte
 archive id) and 1.44 (2 byte archive id). I added some comments to make
 clear how this works.

 Because I didn't want to introduce another variable to tell if an archive
 with version 7 is from 1.43 or from 1.44 I increased the archive version
 to 8 if 1.44 was detected while loading the archive header. This should
 work because when 1.45 finally did increase the archive version to 8 it
 didn't introduce any other changes in the way it writes binary archives. I
 also searched the rest of the serialization code for some other places
 where there are checks for an archive version of 8 in some way but didn't
 find anything. (Even if I really overlooked something it would only lead
 to version 1.44 binary archives not working and a later patch could fix
 this by adding another variable to differentiate between 1.43 and 1.44.)

 The patch is against the current trunk. I did some tests with various
 archives from 1.34-1.46.1 and ran the regression tests. Please test and
 review this patch. If it is applied the documentation also has to be
 updated.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4660#comment:52>
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:12 UTC