|
Boost : |
Subject: [boost] [1.43][Serialization] Serialization library seriosly broken
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2010-04-24 09:54:32
As I alluded to in my mail yesterday, the serialization library seems to be
utterly broken in the current trunk, and unfortunately in the current
release branch as well.
We're seeing assertions at application initialization time during
serialization registration in the file void_cast.hpp, line 225. That is in
debug builds. In release builds we're seeing aborts later on. These problems
seem to be caused by registering the same type more than once but from
different shared libraries.
We do not intentionally register the types more than once, even more, we
have no control over this. Here is the simplified code causing the multiple
registrations from different modules:
struct Parameter_impl : ::Par // ::Par is a C-struct
{
private:
friend class boost::serialization::access;
template<class Archive>
void serialize(Archive &ar, const unsigned int version)
{
ar & lambda;
ar & allowedl;
// more serialization going on
}
};
struct Parameter {
boost::shared_ptr< Parameter_impl > p;
// ...
private:
friend class boost::serialization::access;
template<class Archive>
void serialize(Archive &ar, const unsigned int version)
{
ar & p;
}
};
Note: no BOOST_..._EXPORT or other serialization macros are utilized in this
file.
This code is included by several files from different shared library modules
as it is passed around.
It is just including this file into compilation units from different shared
libraries what causes the problems described above.
All code worked before and still does with V1.42.
If this error stays in the release branch the whole Boost release will be
unusable for us, causing endless grief in the future.
Regards Hartmut
---------------
Meet me at BoostCon
www.boostcon.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk