On 6/29/18 2:07 AM, Alexander Grund via Boost wrote:
Hi all again,
I have to stress the importance of a swift action/review here as the current master now contains the flawed commit again that leads to a certain crash when using shared libraries linked against static boost.
Right now I'm bogged down in other stuff, but I did find a little time to investigate this some more. I reviewed the information on the failures if test_dll_export along with the corresponding config.info output. I've found some useful things. e.g. doesn't occur on windows. Seems to occur only on linux platforms. I've found it occurs on both lib++ and libstdc++ evironments. I can't figure out from the test results whether the tests are linking from static or shared standard libraries. I didn't realize that this occurs (only on?) configurations which create shared libraries which link against static boost. Mixing shared libraries is a known cause of difficulties. It many cases it seems to work, but in many cases it also leads to unfixable failures. I'm still looking into this.
Reproduce with: git clone git@github.com:boostorg/boost.git && cd boost && git submodule update --recursive --init ./bootstrap.sh && ./b2 variant=release link=static --with-libraries=serialization cxxflags=-fPIC cflags=-fPIC -j2 mkdir mytest && cd mytest Create 3 files:
|test_multi_singleton.cpp:intf();intg();intmain(intargc,char**){// Make sure symbols are usedif(argc==8)returnf();if(argc==9)returng();}multi_singleton1.cpp:#include
intf(){return0!=boost::serialization::extended_type_info_typeid<int>::get_const_instance().get_key();}multi_singleton2.cpp:#include intg(){// Use different(!) typereturn0!=boost::serialization::extended_type_info_typeid<float>::get_const_instance().get_key();}| export CPATH=$PWD/.. export LIBRARY_PATH=$PWD/../stage/lib/ g++ multi_singleton1.cpp -lboost_serialization -fPIC -shared -olibmulti_singleton1.so g++ multi_singleton2.cpp -lboost_serialization -fPIC -shared -olibmulti_singleton2.so g++ test_multi_singleton.cpp -L. -lmulti_singleton1 -lmulti_singleton2 LD_LIBRARY_PATH=. ./a.out
Result: *** Error in `./a.out': double free or corruption (fasttop): 0x0000000001accc20 ***
I'll look into your test.
This is due to the bug I described and fixed in https://github.com/boostorg/serialization/pull/105. An extract from there only showing the bug with `is_destroyed` is https://github.com/boostorg/serialization/pull/110
In the current state I'm strongly against including the latest master from Boost.Serialization. It would be better, to include the Boost 1.67 version of it which "only" contains a memory leak.
We differ on the cause, the fix and the work around. Objection noted. Robert Ramey
Regards, Alex
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost