Subject: [Boost-bugs] [Boost C++ Libraries] #2217: serialization 1.36.0 extended_type_info exit issue(s)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-08-18 21:17:26
#2217: serialization 1.36.0 extended_type_info exit issue(s)
----------------------------------+-----------------------------------------
Reporter: timothysc_at_[hidden] | Owner: ramey
Type: Bugs | Status: new
Milestone: Boost 1.37.0 | Component: serialization
Version: Boost 1.36.0 | Severity: Problem
Keywords: extended_type_info |
----------------------------------+-----------------------------------------
I'm running some serialization unit-tests which pass with flying colors
under 1.35.0 and earlier, however they seg-fault on exit when run through
1.36.0.
The error appears to deal with destruction of
extended_type_info_typeid objects, and *only* manifests itself when I load
an archive through a shared_ptr<T>. The load will appear to function
properly, then on exit of the application, <<Death>>. This occurs even if
I remove BOOST_CLASS_EXPORT && BOOST_CLASS_TYPE_INFO as the shared_ptr is
to the derived element, and I'm not testing through a base.
//////////////////////////// snippet: ////////////////////////////
BOOST_AUTO_TEST_CASE( MyTestClass_Serialization )
{
// MyTestClass is an uses intrusive serialization (You could use any
object)
boost::shared_ptr<MyTestClass> outtie ( new MyTestClass() );
boost::shared_ptr<MyTestClass> innie;
std::ofstream os( "MyTestClass_Serialization.xml", std::ios_base::out
);
boost::archive::xml_oarchive xmlao(os);
xmlao << boost::serialization::make_nvp( "testKey", outtie );
os.close();
std::ifstream is( "MyTestClass_Serialization.xml", std::ios_base::in
);
boost::archive::xml_iarchive xmlai( is );
xmlai >>boost::serialization::make_nvp( "testKey", innie );
is.close();
BOOST_CHECK_NO_THROW();
}
Ran on Ubuntu(Linux) 8.04 using gcc 4.2.3
//////////////////////////// gdb output: ////////////////////////////
*** No errors detected
[New Thread 0xb73e26c0 (LWP 4715)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb73e26c0 (LWP 4715)]
0xb76bb56b in std::_Rb_tree_rebalance_for_erase () from
/usr/lib/libstdc++.so.6
(gdb) bt
#0 0xb76bb56b in std::_Rb_tree_rebalance_for_erase () from
/usr/lib/libstdc++.so.6
#1 0xb7a38221 in
std::_Rb_tree<boost::serialization::detail::extended_type_info_typeid_0
const*, boost::serialization::detail::extended_type_info_typeid_0 const*,
std::_Identity<boost::serialization::detail::extended_type_info_typeid_0
const*>, boost::serialization::detail::type_compare,
std::allocator<boost::serialization::detail::extended_type_info_typeid_0
const*> >::erase (this=0xb7a93c94, __position={_M_node = 0x810a3f8}) at
/usr/include/c++/4.2/bits/stl_tree.h:1261
#2 0xb7a38270 in
std::multiset<boost::serialization::detail::extended_type_info_typeid_0
const*, boost::serialization::detail::type_compare,
std::allocator<boost::serialization::detail::extended_type_info_typeid_0
const*> >::erase (this=0xb7a93c94, __position={_M_node = 0x810a3f8}) at
/usr/include/c++/4.2/bits/stl_multiset.h:346
#3 0xb7a37482 in
boost::serialization::detail::extended_type_info_typeid_0::type_unregister
(this=0x810749c) at
/opt/tomodev/env/boost/libs/serialization/src/extended_type_info_typeid.cpp:93
#4 0x080b001a in ~extended_type_info_typeid (this=0x810749c) at
/opt/tomodev/env/boost/boost/serialization/extended_type_info_typeid.hpp:80
#5 0x0809ebe2 in __tcf_49 () at
/opt/tomodev/env/boost/boost/serialization/singleton.hpp:104
#6 0xb74f7084 in exit () from /lib/tls/i686/cmov/libc.so.6
#7 0xb74df458 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#8 0x0809e691 in _start ()
-- Ticket URL: <http://svn.boost.org/trac/boost/ticket/2217> 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:49:58 UTC