Subject: Re: [boost] [Serialization] Bizarre bug
From: Jarl Lindrud (jarl.lindrud_at_[hidden])
Date: 2009-08-10 22:50:17
Robert Ramey <ramey <at> rrsd.com> writes:
> OK - A2 produces an archive that cannot be read.
> I would argue that including the dummy just to
> provoke this "bug" is just a pathological case and
> basically constitutes an error - albiet a subtle one.
What you call dummy code, was whittled down from the original (real) code that
triggered the error. It's not pathological in any way. It's nothing more than a
serialization instantiation in a different and unrelated part of the program.
What's pathological is the runtime effect that the instantiation has.
> So in short, I believe that the only way to have such
> a problem is include dummy code which I don't
> consider a huge problem.
Really now... Could we please drop the assertion that it is "dummy code". It's
a minimal reproduction of a real isue. It's been stripped down for your own
convenience, to demonstrate the root cause of the problem.
> > If you were to implement a generic IPC marshalling layer, you would
> > end up with the kind of code that A1, A2, and B contain.
> I'm not seeing that.
I guess you could always take my word for it. In any case, we can conclude that
all 3 programs make correct use of B.Ser. , and yet the deserialization error
> > Another wrinkle in IPC serialization, is that one program may contain
> > only serialization code for a type T (and not deserialization), while
> > another program may contain only deserialization code for type T (and
> > not serialization). If that makes the programs ill-formed in your
> > view,
> It doesn't
> > then I guess one would have to conclude that B.Ser. is not an
> > appropriate choice for IPC applications.
> Hence, I would not draw such a conclusion.
I think I must profess some skepticism here. In your post on Aug 4 you wrote
"This system is broken for the case where ar << ptr is invoked but ar >> ptr
isn't", regarding instantiation of pointer serialization code. And yet that is
exactly the situation that would arise, when you have request and response
objects in an IPC system, each containing different sets of user-defined types.
Clients serialize requests, but they don't deserialize them. And conversely,
servers deserialize requests, but don't serialize them.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk