[Boost-bugs] [Boost C++ Libraries] #7498: archive::binary_iarchive failure loading map<string, string>

Subject: [Boost-bugs] [Boost C++ Libraries] #7498: archive::binary_iarchive failure loading map<string, string>
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-11 20:31:34


#7498: archive::binary_iarchive failure loading map<string,string>
-----------------------------------------+----------------------------------
 Reporter: kaedenn@… | Owner: ramey
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: serialization
  Version: Boost 1.51.0 | Severity: Showstopper
 Keywords: binary serialize map string |
-----------------------------------------+----------------------------------
 I create two std::map<std::string, std::string> instances, one of which
 having two dozen contents, the other default-initialized. I serialize the
 former using boost::archive::binary_oarchive and load it into the latter
 using boost::archive::binary_iarchive.


 {{{
 // This Win32-specific test creates a std::map from strings to strings and
 // then serializes it to a file. We then attempt to desearialize from that
 // file. On boost_1_45_0 and boost_1_51_0 for Win32 this testcase fails on
 // our company's secondary build machine.
 }}}

 {{{
 /*
 At the top of the call stack (see attachment for context),
     std::streamsize s = static_cast<std::streamsize>(count /
 sizeof(Elem));
     std::streamsize scount = m_sb.sgetn(
         static_cast<Elem *>(address),
         s
     );
     if(scount != s)
         boost::serialization::throw_exception(
             archive_exception(archive_exception::input_stream_error)
         );
 `scount` is 0, `s` is 8. It's trying to load a size_type, presumably for a
 string length or a map length.
 */
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7498>
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:50:10 UTC