Boost logo

Boost :

Subject: Re: [boost] [Serialization] Bizarre bug
From: Peter Dimov (pdimov_at_[hidden])
Date: 2009-08-11 05:06:12


Robert Ramey wrote:
> The problem only occurs when program 1 contains only
>
> ar << T
>
> and program 2 contains
>
> ar >> T
> and
> ar >> Tptr
>
> But if only program 2 contains ar >> Tptr - how does the
> archive it's supposed to read get created? It can be only
> created by a program which also contains ar << Tptr. That
> is in order for serialization to make any sense at all both
> programs have to contain exactly the same sequence of
> loads and saves. Hence. they will both either serializations
> for the same set of types at compiler time.
>
> The only case where this can occur is where the program
> is changed after an archive is created. And even then it
> takes some effort to produce.

The other case in which this occurs is when program 2 needs to read archives
from both program 1 and program 3 (containing ar << TPtr).

> In the IPC case, the program could only occur when
> the recieving program is a later version of the sending version.
> That is the same problem - reading an old archive version.

And you are saying that old archive versions are not supposed to be
readable?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk