Using Boost 1.36, I'm seeing a crash when serializing a 256K malloc
block
using binary_object to an XML archive, something like this:
using namespace boost;
serialization::binary_object dataObject =
serialization::make_binary_object(dataBlock, dataSize);
ar << serialization::make_nvp("data_contents", dataObject);
The crash is in
boost::archive::iterators::transform_width::fill ()
template
CharType transform_width::fill(){
CharType retval = 0;
unsigned int missing_bits = BitsOut;
for(;;){
unsigned int bcount;
if(! m_bufferfull){
m_buffer = * this->base_reference(); <-------- crash here
m_bufferfull = true;
bcount = BitsIn;
}
else
...
and the stack back up to my object serialization looks like:
#0 0x0008f12e in boost::archive::iterators::transform_width::fill () at transform_width.hpp:139
#1 0x0008f12e in boost::archive::iterators::transform_width::dereference_impl () at transform_width.hpp:71
#2 0x0008f12e in
boost::iterator_facade, char, boost::single_pass_traversal_tag, char,
int>::operator* () at transform_width.hpp:78
#3 0x0008f12e in
dereference > [inlined] () at transform_width.hpp:137
#4 0x0008f12e in boost::archive::iterators::transform_width::dereference () at transform_width.hpp:635
#5 0x0008f12e in
boost
::iterator_facade
<
boost
::transform_iterator
,
boost::use_default, boost::use_default>, char,
boost::single_pass_traversal_tag, char, int>::operator* () at
transform_width.hpp:517
#6 0x0008f12e in
dereference
<
boost
::transform_iterator
,
boost::use_default, boost::use_default> > [inlined] () at
transform_width.hpp:80
#7 0x0008f12e in
boost
::transform_iterator
,
boost::use_default, boost::use_default>::dereference () at
transform_width.hpp:635
#8 0x0008f12e in
boost
::archive
::iterators
::insert_linebreaks
<
boost
::archive
::iterators
::base64_from_binary, char>, 72, char const>::dereference () at
insert_linebreaks.hpp:517
#9 0x0008f12e in
dereference
<
boost
::archive
::iterators
::insert_linebreaks
<
boost
::archive
::iterators
::base64_from_binary, char>, 72, const char> > [inlined] () at
insert_linebreaks.hpp:517
#10 0x0008f12e in
boost
::iterator_facade
<
boost
::archive
::iterators
::insert_linebreaks
<
boost
::archive
::iterators
::base64_from_binary, char>, 72, char const>, char const,
boost::single_pass_traversal_tag, char const, int>::operator* () at
iterator_facade.hpp:635
#11 0x0008f12e in
copy
<
boost
::archive
::iterators
::insert_linebreaks
<
boost
::archive
::iterators
::base64_from_binary, char>, 72, const char>,
boost::archive::iterators::ostream_iterator<char> > [inlined] () at
iterator_facade.hpp:270
#12 0x0008f12e in
copy
<
boost
::archive
::iterators
::insert_linebreaks
<
boost
::archive
::iterators
::base64_from_binary, char>, 72, const char>,
boost::archive::iterators::ostream_iterator<char> > [inlined] () at
iterator_facade.hpp:270
#13 0x0008f12e in
boost::archive::basic_text_oprimitivestd::ostream::save_binary
(this=0xbffff178, address=0x423000, count=262144) at libs/
serialization/src/basic_text_oprimitive.cpp:317
#14 0x000aaae4 in
boost
::archive
::xml_oarchive_implboost::archive::xml_oarchive::save_binary
(this=0xbffff168, address=0x463000, count=4599808) at libs/
serialization/src/basic_text_oprimitive.cpp:317
#15 0x00054032 in
boost
::serialization::binary_object::saveboost::archive::xml_oarchive
(this=0xbfffe730, ar=@0xbffff168) at libs/serialization/src/
basic_text_oprimitive.cpp:317
#16 0x00054059 in
boost
::serialization::access::member_save (ar=@0xbffff168,
t=@0xbfffe730, file_version=0) at libs/serialization/src/
basic_text_oprimitive.cpp:317
#17 0x00054081 in
boost
::serialization::detail::member_saver::invoke (ar=@0xbffff168,
t=@0xbfffe730, file_version=0) at libs/serialization/src/
basic_text_oprimitive.cpp:317
#18 0x000540a9 in
boost::serialization::split_member (ar=@0xbffff168, t=@0xbfffe730,
file_version=0) at libs/serialization/src/basic_text_oprimitive.cpp:317
#19 0x000540d1 in
boost
::serialization
::binary_object::serializeboost::archive::xml_oarchive
(this=0xbfffe730, ar=@0xbffff168, file_version=0) at libs/
serialization/src/basic_text_oprimitive.cpp:317
#20 0x000540f9 in
boost::serialization::access::serialize (ar=@0xbffff168, t=@0xbfffe730,
file_version=0) at libs/serialization/src/basic_text_oprimitive.cpp:317
#21 0x00054121 in
boost::serialization::serialize (ar=@0xbffff168, t=@0xbfffe730,
file_version=0) at libs/serialization/src/basic_text_oprimitive.cpp:317
#22 0x00054165 in
boost::serialization::serialize_adl (ar=@0xbffff168, t=@0xbfffe730,
file_version=0) at libs/serialization/src/basic_text_oprimitive.cpp:317
#23 0x0005418e in
boost
::archive::detail::save_non_pointer_type::save_only::invoke
(ar=@0xbffff168, t=@0xbfffe730) at libs/serialization/src/
basic_text_oprimitive.cpp:317
#24 0x000541ae in
boost
::archive::detail::save_non_pointer_type::invoke (ar=@0xbffff168,
t=@0xbfffe730) at libs/serialization/src/basic_text_oprimitive.cpp:317
#25 0x000541ce in boost::archive::save (ar=@0xbffff168, t=@0xbfffe730)
at libs/serialization/src/basic_text_oprimitive.cpp:317
#26 0x000541f8 in
boost
::archive
::detail
::common_oarchive
<
boost
::archive
::xml_oarchive>::save_override (this=0xbffff168, t=@0xbfffe730) at libs/serialization/src/
basic_text_oprimitive.cpp:317
#27 0x00054242 in
boost
::archive
::basic_xml_oarchive
<
boost
::archive
::xml_oarchive>::save_overrideboost::serialization::binary_object
(this=0xbffff168, t=@0xbfffe738) at libs/serialization/src/
basic_text_oprimitive.cpp:317
#28 0x0005428e in
boost
::archive
::detail::interface_oarchiveboost::archive::xml_oarchive::operator<<
boost::serialization::binary_object const>
(this=0xbffff168, t=@0xbfffe738) at libs/serialization/src/
basic_text_oprimitive.cpp:317
#29 0x00054301 in MacTierra::Soup::saveboost::archive::xml_oarchive
(this=0x500880, ar=@0xbffff168, version=0) at libs/serialization/src/
basic_text_oprimitive.cpp:317
#30 0x0005432b in
boost
::serialization::access::member_save (ar=@0xbffff168, t=@0x500880, file_version=0)
at libs/serialization/src/basic_text_oprimitive.cpp:317
#31 0x00054353 in
boost
::serialization::detail::member_saver::invoke (ar=@0xbffff168, t=@0x500880, file_version=0)
at libs/serialization/src/basic_text_oprimitive.cpp:317
#32 0x0005437b in
boost::serialization::split_member (ar=@0xbffff168, t=@0x500880, file_version=0) at libs/
serialization/src/basic_text_oprimitive.cpp:317
#33 0x000543a3 in
MacTierra::Soup::serializeboost::archive::xml_oarchive
(this=0x500880, ar=@0xbffff168, file_version=0) at libs/serialization/
src/basic_text_oprimitive.cpp:317
This is on Mac OS X, using gcc 4.0, compiling for intel.
Has anyone seen this crash? Should I reduce and file a bug?
Simon