Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1508: text_map_binary_archive failure
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-12-23 01:36:51
#1508: text_map_binary_archive failure
--------------------------------------------+-------------------------------
Reporter: jrp at dial dot pipex dot com | Owner: ramey
Type: Bugs | Status: reopened
Milestone: Boost 1.35.0 | Component: serialization
Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
--------------------------------------------+-------------------------------
Changes (by Richard Webb <richard.webb_at_[hidden]>):
* status: closed => reopened
* resolution: wontfix =>
Comment:
This isn't simply a test artifact - you get the same error with the simple
program:
{{{
int _tmain(int argc, _TCHAR* argv[])
{
std::stringstream sss;
boost::archive::text_oarchive oa(sss);
std::string out;
oa << out;
std::string in;
boost::archive::text_iarchive ia(sss);
ia >> in;
return 0;
}
}}}
The same thing happens on both VC8(SP1) and VC9 (and both work fine if the
initial string isn't empty).
The problem with the
{{{
is.read(&(*s.begin()), size);
}}}
is that if size is 0 (and therefore s is empty) you end up dereferencing
an 'invalid' iterator, which the debug iterators don't like you doing.
--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1508#comment:3>
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:57 UTC