Boost logo

Boost Users :

Subject: Re: [Boost-users] crash in boost serialization (1.44)
From: Dave Abrahams (dave_at_[hidden])
Date: 2010-12-13 10:08:53


On Fri, Dec 10, 2010 at 12:35 PM, Robert Ramey <ramey_at_[hidden]> wrote:
>  > In the current implementation,
>> the various serializers are instantiated, through a singleton, at the
>> point of use. If two classes from two different DLLs have a member of
>> a certain type, both DLLs will instantiate singletons for serializers.
>
> This is the behavior of all current compiler/linker combinations.

Mostly just on Windows, though Linux has its own quirks that come up
when you use dlopen().

> It is not addressable from within a library or application.

Well, yes and no. Given the current structure of Boost.Serialization,
it's definitely a problem that only the library integrator can solve,
by structuring his application appropriately. However, if you were
willing to change the structure of Boost.Serialization, you could have
all those DLLs link to a common DLL which is where the singletons are
"registered" (you could create them there for a reduction in overall
code size, but I assume you want to keep that DLL as lightweight as
possible). You'd have to explicitly *not* deliver that common DLL as
a static library.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net