Boost logo

Boost Users :

From: junyi.sun_at_[hidden]
Date: 2005-02-25 14:05:09


Hi, I have a class using boost_1.32/serialization to save/restore object
data and it's working fine for loading & saving its own archive. I tried to
make it load an archive saved by an unrelated class in order to verify
exception handling of reading wrong/ corrupt archive. It dumps core at
basic_iarchive_impl::load_pointer. Is it a known issue ? Anyone has similar
experience ? Thanks.
Junyi Sun

--------------- here the core trace ----------------
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libtcl8.4.so...done.
Loaded symbols for /usr/lib/libtcl8.4.so
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /usr/lib/libstdc++.so.5...done.
Loaded symbols for /usr/lib/libstdc++.so.5
Reading symbols from /lib/tls/libm.so.6...done.
Loaded symbols for /lib/tls/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /lib/libnss_dns.so.2...done.
Loaded symbols for /lib/libnss_dns.so.2
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
#0 0x081c16cb in boost::archive::detail::basic_iarchive_impl::load_pointer ()
(gdb) bt
#0 0x081c16cb in boost::archive::detail::basic_iarchive_impl::load_pointer ()
#1 0x081c0d23 in boost::archive::detail::basic_iarchive::load_pointer ()
#2 0x08060344 in
boost::archive::detail::load_pointer_type<boost::archive::text_iarchive,
MyObjectP*>::invoke (ar=@0xfef3c240,
     t=@0xfef3bf74) at iserializer.hpp:450
#3 0x08060304 in load<boost::archive::text_iarchive, MyObjectP*>
(ar=@0xfef3c240, t=@0xfef3bf74) at iserializer.hpp:529
#4 0x080602ea in load_override<MyObjectP*> (this=0xfef3c240,
t=@0xfef3bf74) at basic_text_iarchive.hpp:60
#5 0x080602c6 in load_override<MyObjectP*> (this=0xfef3c240,
t=@0xfef3bf74) at text_iarchive.hpp:59
#6 0x08060298 in operator&<MyObjectP*> (this=0xfef3c240, t=@0xfef3bf74) at
interface_iarchive.hpp:92
#7 0x08060260 in serialize<boost::archive::text_iarchive>
(this=0xfef3bc80, ar=@0xfef3c240) at nvp.hpp:58
#8 0x0806023d in serialize<boost::archive::text_iarchive,
boost::serialization::nvp<MyObjectP*> > (ar=@0xfef3c240, t=@0xfef3bc80,
     file_version=0) at access.hpp:106
#9 0x0806021b in serialize<boost::archive::text_iarchive,
boost::serialization::nvp<MyObjectP*> > (ar=@0xfef3c240, t=@0xfef3bc80,
     file_version=0) at serialization.hpp:78
#10 0x080601f9 in serialize_adl<boost::archive::text_iarchive,
boost::serialization::nvp<MyObjectP*> > (ar=@0xfef3c240,
     t=@0xfef3bc80, file_version=0) at serialization.hpp:121
#11 0x080601d8 in
boost::archive::detail::load_non_pointer_type<boost::archive::text_iarchive,
boost::serialization::nvp<MyObjectP*> >::load_only::invoke (ar=@0xfef3c240,
t=@0xfef3bc80) at iserializer.hpp:318
#12 0x080601b6 in
boost::archive::detail::load_non_pointer_type<boost::archive::text_iarchive,
boost::serialization::nvp<MyObjectP*> >::invoke (ar=@0xfef3c240,
t=@0xfef3bc80) at iserializer.hpp:366
#13 0x0806019c in load<boost::archive::text_iarchive,
boost::serialization::nvp<MyObjectP*> > (ar=@0xfef3c240, t=@0xfef3bc80)
     at iserializer.hpp:529
#14 0x08060182 in load_override<boost::serialization::nvp<MyObjectP*> >
(this=0xfef3c240, t=@0xfef3bc80)
     at basic_text_iarchive.hpp:60
#15 0x0806015e in load_override<boost::serialization::nvp<MyObjectP*> >
(this=0xfef3c240, t=@0xfef3bc80) at text_iarchive.hpp:59
#16 0x08060130 in operator>><boost::serialization::nvp<MyObjectP*> >
(this=0xfef3c240, t=@0xfef3bc80) at interface_iarchive.hpp:105
#17 0x080600b8 in operator&<boost::serialization::nvp<MyObjectP*> >
(this=0xfef3c240, t=@0xfef3bc80) at interface_iarchive.hpp:111
#18 0x0805fe43 in serialize<boost::archive::text_iarchive, std::string,
MyObjectP*> (ar=@0xfef3c240, p=@0xfef3bf70) at utility.hpp:47
#19 0x0805f59f in serialize_adl<boost::archive::text_iarchive,
std::pair<std::string, MyObjectP*> > (ar=@0xfef3c240, t=@0xfef3bf70,
     file_version=1) at serialization.hpp:121
#20 0x0805f48f in
boost::archive::detail::iserializer<boost::archive::text_iarchive,
std::pair<std::string, MyObjectP*> >::load_object_data (this=0x8a3f6c0,
ar=@0xfef3c240, x=0xfef3bf70, file_version=1) at iserializer.hpp:155
#21 0x081c143a in boost::archive::detail::basic_iarchive_impl::load_object ()
#22 0x081c0d00 in boost::archive::detail::basic_iarchive::load_object ()
#23 0x0805df95 in
boost::archive::detail::load_non_pointer_type<boost::archive::text_iarchive,
std::pair<std::string, MyObjectP*> >::load::invoke (ar=@0xfef3c240,
t=@0xfef3bf70) at iserializer.hpp:328
#24 0x0805df6c in
boost::archive::detail::load_non_pointer_type<boost::archive::text_iarchive,
std::pair<std::string, MyObjectP*> >::invoke (ar=@0xfef3c240,
t=@0xfef3bf70) at iserializer.hpp:366
#25 0x0805df52 in load<boost::archive::text_iarchive,
std::pair<std::string, MyObjectP*> > (ar=@0xfef3c240, t=@0xfef3bf70)
     at iserializer.hpp:529
#26 0x0805df38 in load_override<std::pair<std::string, MyObjectP*> >
(this=0xfef3c240, t=@0xfef3bf70) at basic_text_iarchive.hpp:60
#27 0x0805df14 in load_override<std::pair<std::string, MyObjectP*> >
(this=0xfef3c240, t=@0xfef3bf70) at text_iarchive.hpp:59
#28 0x0805dee6 in operator&<std::pair<std::string, MyObjectP*> >
(this=0xfef3c240, t=@0xfef3bf70) at interface_iarchive.hpp:92
#29 0x0805deae in serialize<boost::archive::text_iarchive>
(this=0xfef3bf60, ar=@0xfef3c240) at nvp.hpp:58
#30 0x0805de8b in serialize<boost::archive::text_iarchive,
boost::serialization::nvp<std::pair<std::string, MyObjectP*> > > (
     ar=@0xfef3c240, t=@0xfef3bf60, file_version=0) at access.hpp:106
#31 0x0805de69 in serialize<boost::archive::text_iarchive,
boost::serialization::nvp<std::pair<std::string, MyObjectP*> > > (
     ar=@0xfef3c240, t=@0xfef3bf60, file_version=0) at serialization.hpp:78
#32 0x0805de47 in serialize_adl<boost::archive::text_iarchive,
boost::serialization::nvp<std::pair<std::string, MyObjectP*> > > (
     ar=@0xfef3c240, t=@0xfef3bf60, file_version=0) at serialization.hpp:121
#33 0x0805de26 in
boost::archive::detail::load_non_pointer_type<boost::archive::text_iarchive,
boost::serialization::nvp<std::pair<std::string,
MyObjectP*> > >::load_only::invoke (ar=@0xfef3c240, t=@0xfef3bf60) at
iserializer.hpp:318
#34 0x0805de04 in
boost::archive::detail::load_non_pointer_type<boost::archive::text_iarchive,
boost::serialization::nvp<std::pair<std::string, MyObjectP*> > >::invoke
(ar=@0xfef3c240, t=@0xfef3bf60) at iserializer.hpp:366
#35 0x0805ddea in load<boost::archive::text_iarchive,
boost::serialization::nvp<std::pair<std::string, MyObjectP*> > > (
---Type <return> to continue, or q <return> to quit---
     ar=@0xfef3c240, t=@0xfef3bf60) at iserializer.hpp:529
#36 0x0805ddd0 in
load_override<boost::serialization::nvp<std::pair<std::string,
MyObjectP*> > > (this=0xfef3c240, t=@0xfef3bf60)
     at basic_text_iarchive.hpp:60
#37 0x0805ddac in
load_override<boost::serialization::nvp<std::pair<std::string,
MyObjectP*> > > (this=0xfef3c240, t=@0xfef3bf60)
     at text_iarchive.hpp:59
#38 0x0805dd7e in
operator>><boost::serialization::nvp<std::pair<std::string, MyObjectP*> > >
(this=0xfef3c240, t=@0xfef3bf60)
     at interface_iarchive.hpp:105
#39 0x0805d2d2 in
boost::serialization::stl::archive_input_map<boost::archive::text_iarchive,
std::map<std::string, MyObjectP*, std::less<std::string>,
std::allocator<std::pair<std::string const, MyObjectP*> > > >::operator()
(this=0xfef3bfae, ar=@0xfef3c240,
     s=@0xe3693e4) at collections_load_imp.hpp:110
#40 0x0805d192 in load_collection<boost::archive::text_iarchive,
std::map<std::string, MyObjectP*, std::less<std::string>,
std::allocator<std::pair<const std::string, MyObjectP*> > >,
boost::serialization::stl::archive_input_map<boost::archive::text_iarchive,
std::map<std::string, MyObjectP*, std::less<std::string>,
std::allocator<std::pair<const std::string, MyObjectP*> > > >,
boost::serialization::stl::no_reserve_imp<std::map<std::string, MyObjectP*,
std::less<std::string>, std::allocator<std::pair<const std::string,
MyObjectP*> > > > > (ar=@0xfef3c240, s=@0xe3693e4) at
collections_load_imp.hpp:158
#41 0x0805d110 in load<boost::archive::text_iarchive, MyObjectP*,
std::string, std::less<std::string>, std::allocator<std::pair<const
std::string, MyObjectP*> > > (ar=@0xfef3c240, t=@0xe3693e4) at map.hpp:61
#42 0x0805d0f5 in
boost::serialization::free_loader<boost::archive::text_iarchive,
std::map<std::string, MyObjectP*, std::less<std::string>,
std::allocator<std::pair<std::string const, MyObjectP*> > > >::invoke
(ar=@0xfef3c240, t=@0xe3693e4, file_version=0)
     at split_free.hpp:55
#43 0x0805d0d3 in split_free<boost::archive::text_iarchive,
std::map<std::string, MyObjectP*, std::less<std::string>,
std::allocator<std::pair<const std::string, MyObjectP*> > > >
(ar=@0xfef3c240, t=@0xe3693e4, file_version=0) at split_free.hpp:66
#44 0x0805d0b1 in serialize<boost::archive::text_iarchive, MyObjectP*,
std::string, std::less<std::string>, std::allocator<std::pair<const
std::string, MyObjectP*> > > (ar=@0xfef3c240, t=@0xe3693e4, file_version=0)
at map.hpp:81
#45 0x0805b339 in serialize_adl<boost::archive::text_iarchive,
std::map<std::string, MyObjectP*, std::less<std::string>,
std::allocator<std::pair<const std::string, MyObjectP*> > > >
(ar=@0xfef3c240, t=@0xe3693e4, file_version=0) at serialization.hpp:121
#46 0x0805b03b in
boost::archive::detail::iserializer<boost::archive::text_iarchive,
std::map<std::string, MyObjectP*, std::less<std::string>,
std::allocator<std::pair<std::string const,
MyObjectP*> > > >::load_object_data (this=0x8a3f5b0, ar=@0xfef3c240,
     x=0xe3693e4, file_version=0) at iserializer.hpp:155
#47 0x081c143a in boost::archive::detail::basic_iarchive_impl::load_object ()
#48 0x081c0d00 in boost::archive::detail::basic_iarchive::load_object ()
#49 0x08058aa3 in
boost::archive::detail::load_non_pointer_type<boost::archive::text_iarchive,
std::map<std::string, MyObjectP*, std::less<std::string>,
std::allocator<std::pair<std::string const, MyObjectP*> > > >::load::invoke
(ar=@0xfef3c240, t=@0xe3693e4)
     at iserializer.hpp:328
#50 0x08058a7a in
boost::archive::detail::load_non_pointer_type<boost::archive::text_iarchive,
std::map<std::string, MyObjectP*, std::less<std::string>,
std::allocator<std::pair<std::string const, MyObjectP*> > > >::invoke
(ar=@0xfef3c240, t=@0xe3693e4)
     at iserializer.hpp:366
#51 0x08058a60 in load<boost::archive::text_iarchive, std::map<std::string,
MyObjectP*, std::less<std::string>, std::allocator<std::pair<const
std::string, MyObjectP*> > > > (ar=@0xfef3c240, t=@0xe3693e4) at
iserializer.hpp:529
#52 0x08058a46 in
boost::archive::basic_text_iarchive<boost::archive::text_iarchive>::load_override<std::map<std::string,
MyObjectP*, std::less<std::string>, std::allocator<std::pair<std::string
const, MyObjectP*> > > > (this=0xfef3c240, t=@0xe3693e4)
     at basic_text_iarchive.hpp:60
#53 0x08058a22 in
boost::archive::text_iarchive_impl<boost::archive::text_iarchive>::load_override<std::map<std::string,
MyObjectP*, std::less<std::string>, std::allocator<std::pair<std::string
const, MyObjectP*> > > > (this=0xfef3c240, t=@0xe3693e4)
     at text_iarchive.hpp:59
#54 0x080579b8 in operator>><std::map<std::string, MyObjectP*,
std::less<std::string>, std::allocator<std::pair<const std::string,
MyObjectP*> > > > (this=0xfef3c240, t=@0xe3693e4) at interface_iarchive.hpp:83
#55 0x08056615 in encode_function (domain_id=208, bat=0xe728070,
     info=0xea2c339 "22 serialization::archive 3 0 0 4 1 1 3\n0 0 0 0 1\n1
0 1\n2 0 1\n3 0", info_len=65) at encode.cc:102


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net