Re: [Boost-users] [serialization] void_caster fix ...
I have created a small project that exhibits consistently the problem. This test comprises of the following components: - BaseDll.dll - TestSer.exe - linked with BaseDll.dll. - ExportDll.dll - linked with BaseDll.dll. There are three classe classes (all serializable): - polymorphic_base implemented inside BaseDll.dll; - polymorphic_derived1 derived from polymorphic_base and implemented inside BaseDll.dll - polymorphic_derived2 derived from polymorphic_base and implemented inside ExportDll.dll TestSer.exe loads ExportDll.dll dynamically via ::LoadLibrary() and calls the the function entry_point() exported by ExportDll.dll using ::GetProcAddress(). Both main() in TestSer.exe and entry_point() in ExportDll.dll create an object polymorphic_derived1 (i.e., the class defined inside BaseDll.dll) and display its address, respectively. Please note, there is no serialization involved. Results: ============================================================= Using boost 1.42 this test fails due to the ASSERT on symbol duplication in basic_serializer_map.cpp. After updating basic_serializer_map.cpp to the version that will eventually go in 1.43, this test fails with the error I described in detail in "[serialization] Potential problems with void_caster". If I change void_cast.cpp to the latest version ( I am afraid that is a post 1.43 version), everything works fine. Setup: ============================================================= I am using a debug build on Visual Studio 2008 Professional with SP1. OS - Windows XP Professional sp 3. The test is run with a version of the boost library built with the following command line bjam -q -a --layout=tagged --build-dir=C:\Downloads\boost_build --prefix=C:\_APP_\boost_1_42_0 --without-python --without-mpi toolset=msvc address-model=32 variant=debug link=static,shared threading=multi runtime-link=shared install In conclusion, if the latest version of void_cast.cpp is not going in boost 1.43, I believe the serialization library will have a problem with this scenario. Thank you, Bogdan
Bogdan wrote:
I have created a small project that exhibits consistently the problem. This test comprises of the following components:
- BaseDll.dll - TestSer.exe - linked with BaseDll.dll. - ExportDll.dll - linked with BaseDll.dll.
There are three classe classes (all serializable):
- polymorphic_base implemented inside BaseDll.dll; - polymorphic_derived1 derived from polymorphic_base and implemented inside BaseDll.dll - polymorphic_derived2 derived from polymorphic_base and implemented inside ExportDll.dll
TestSer.exe loads ExportDll.dll dynamically via ::LoadLibrary() and calls the the function entry_point() exported by ExportDll.dll using
GetProcAddress().
Both main() in TestSer.exe and entry_point() in ExportDll.dll create an object polymorphic_derived1 (i.e., the class defined inside BaseDll.dll) and display its address, respectively.
Please note, there is no serialization involved.
Very good. I appreciate this effort and I will add (eventually) this test to the test suite. I would suggest that you open a track item with this information in it so it will not be forgotten.
In conclusion, if the latest version of void_cast.cpp is not going in boost 1.43, I believe the serialization library will have a problem with this scenario.
I made a change in February that think addressed this. It is now in the release branch. I recently took another look at this and made another change which is now in the trunk. I think this might be solved already in the release branch (1.43). Not that it matters since I couldn't prove it anyway. Now that I have a specific test, I can be more confident. So I'll take another look at it. Good Job. Robert Ramey
participants (2)
-
Bogdan
-
Robert Ramey