Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9612: Memory Access Violation when recursively serializing classes
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-02-03 17:20:28
#9612: Memory Access Violation when recursively serializing classes
------------------------------------------+---------------------------
Reporter: Chris Rusby <chris.rusby@â¦> | Owner: ramey
Type: Bugs | Status: closed
Milestone: To Be Determined | Component: serialization
Version: Boost 1.55.0 | Severity: Problem
Resolution: invalid | Keywords:
------------------------------------------+---------------------------
Comment (by Chris Rusby <chris.rusby@â¦>):
Based on the above, I am of the opinion that I (the user) need to tell the
boost serialization libraries whether to export the implementation of the
instantiated template from the DLL. I envisage adding a new macro that I'd
use something like this:
BOOST_CLASS_EXPORT_KEY3(TestObject, "TestObject", CRASHTESTDLL_EXPORTS)
This would __declspec(dllexport) the instantiated TestObject serialization
templates from the DLL (because CRASHTESTDLL_EXPORTS would be defined),
and from the main program would __declspec(dllimport) the serialization
templates and hence import from the DLL. Hence there would be one and
only one implementation of iserializer<Archive,TestObject?> (which seems
to be the root cause of my problem).
I've not verified that this works, I'm afraid, but I hope to soon. If it
does work, though, the advantage is that it's not going to modify existing
code so is much lower risk.
Thanks,
Chris
PS In answer to your (Robert) original question, when I understand it
fully i.e. when this is fixed and I understand why/how it's fixed, I'd be
more than happy to do some documentation for you.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9612#comment:10> 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:15 UTC