Opened 4 years ago

#13555 new Bugs

Crash when statically linked to the dynamic library when use dlopen.

Reported by: Kipa Mikhail <msnkipa@…> Owned by: Robert Ramey
Milestone: To Be Determined Component: serialization
Version: Boost 1.66.0 Severity: Problem
Keywords: Cc:

Description

Hi!

I have shared library under Linux that is statically linked to boost_serialization. I load my library twice durind my application wors by the use dlopen/dlclose. At the second dlopen I have:

#0 boost::serialization::typeid_system::extended_type_info_typeid_0::is_less_than (rhs=..., this=0x1003730) at libs/serialization/src/extended_type_info_typeid.cpp:59 #1 boost::serialization::typeid_system::type_compare::operator() (this=0x863360, rhs=0xf838f0, lhs=0x1003730) at libs/serialization/src/extended_type_info_typeid.cpp:41 #2 std::_Rb_tree<boost::serialization::typeid_system::extended_type_info_typeid_0 const*, boost::serialization::typeid_system::extended_type_info_typeid_0 const*, std::_Identity<boost::serialization::typeid_system::extended_type_info_typeid_0 const*>, boost::serialization::typeid_system::type_compare, std::allocator<boost::serialization::typeid_system::extended_type_info_typeid_0 const*> >::_M_get_insert_equal_pos (k=<optimized out>, this=0x863360)

at /usr/include/c++/7/bits/stl_tree.h:2069

#3 std::_Rb_tree<boost::serialization::typeid_system::extended_type_info_typeid_0 const*, boost::serialization::typeid_system::extended_type_info_typeid_0 const*, std::_Identity<boost::serialization::typeid_system::extended_type_info_typeid_0 const*>, boost::serialization::typeid_system::type_compare, std::allocator<boost::serialization::typeid_system::extended_type_info_typeid_0 const*> >::_M_insert_equal<boost::serialization::typeid_system::extended_type_info_typeid_0 const*> (

v=<optimized out>, this=0x863360) at /usr/include/c++/7/bits/stl_tree.h:2117

#4 std::multiset<boost::serialization::typeid_system::extended_type_info_typeid_0 const*, boost::serialization::typeid_system::type_compare, std::allocator<boost::serialization::typeid_system::extended_type_info_typeid_0 const*> >::insert (

x=<optimized out>, this=<optimized out>) at /usr/include/c++/7/bits/stl_multiset.h:498

#5 boost::serialization::typeid_system::extended_type_info_typeid_0::type_register (this=0x1003730, ti=...) at libs/serialization/src/extended_type_info_typeid.cpp:91 #6 0x00007fffd6023819 in boost::serialization::extended_type_info_typeid<QFont>::extended_type_info_typeid (this=0x1003730) at /opt/boost/include/boost/serialization/extended_type_info_typeid.hpp:91 #7 0x00007fffd60231a0 in boost::serialization::singleton<boost::serialization::extended_type_info_typeid<QFont> >::get_instance()::singleton_wrapper::singleton_wrapper() (this=0x1003730)

at /opt/boost/include/boost/serialization/singleton.hpp:121

#8 0x00007fffd6023213 in boost::serialization::singleton<boost::serialization::extended_type_info_typeid<QFont> >::get_instance () at /opt/boost/include/boost/serialization/singleton.hpp:142 #9 0x00007fffd6022e83 in boost::serialization::singleton<boost::serialization::extended_type_info_typeid<QFont> >::get_const_instance () at /opt/boost/include/boost/serialization/singleton.hpp:156 #10 0x00007fffd6022aca in boost::archive::detail::oserializer<boost::archive::binary_oarchive, QFont>::oserializer (this=0x1003710) at /opt/boost/include/boost/archive/detail/oserializer.hpp:116 #11 0x00007fffd6022744 in boost::serialization::singleton<boost::archive::detail::oserializer<boost::archive::binary_oarchive, QFont> >::get_instance()::singleton_wrapper::singleton_wrapper() (this=0x1003710)

at /opt/boost/include/boost/serialization/singleton.hpp:121

#12 0x00007fffd60227b7 in boost::serialization::singleton<boost::archive::detail::oserializer<boost::archive::binary_oarchive, QFont> >::get_instance () at /opt/boost/include/boost/serialization/singleton.hpp:142 #13 0x00007fffd60166e9 in static_initialization_and_destruction_0 (initialize_p=1, priority=65535) at /opt/boost/include/boost/serialization/singleton.hpp:173 #14 0x00007fffd60167ba in _GLOBALsub_I_archivebuilder.cpp(void) () at /home/misha/Documents/devel/svn/soac/trunk/diagnostic/dcsplugins/development/gui/qt/archivebuilder.cpp:233 #15 0x00007ffff7de640a in call_init.part () from /lib64/ld-linux-x86-64.so.2 #16 0x00007ffff7de6516 in _dl_init () from /lib64/ld-linux-x86-64.so.2 #17 0x00007ffff7dea67f in dl_open_worker () from /lib64/ld-linux-x86-64.so.2 #18 0x00007ffff4d59e5f in _dl_catch_exception () from /lib64/libc.so.6 #19 0x00007ffff7de9f1a in _dl_open () from /lib64/ld-linux-x86-64.so.2 #20 0x00007ffff2c8af96 in dlopen_doit () from /lib64/libdl.so.2 #21 0x00007ffff4d59e5f in _dl_catch_exception () from /lib64/libc.so.6 #22 0x00007ffff4d59eef in _dl_catch_error () from /lib64/libc.so.6 #23 0x00007ffff2c8b685 in _dlerror_run () from /lib64/libdl.so.2 #24 0x00007ffff2c8b051 in dlopen@@GLIBC_2.2.5 () from /lib64/libdl.so.2

Qt libraries are linked dynamically to all parts of my application.

Change History (0)

Note: See TracTickets for help on using tickets.