Opened 11 years ago
Closed 11 years ago
#5939 closed Bugs (wontfix)
Problems while trying to deserialize an std::string
Reported by: | Owned by: | Robert Ramey | |
---|---|---|---|
Milestone: | To Be Determined | Component: | serialization |
Version: | Boost 1.47.0 | Severity: | Problem |
Keywords: | serialize std:; string | Cc: |
Description
To reproduce: Windows XP Sp3 QtCreator 2.2.1 mingw440 for windows as the compiler
Write a code that serializes then deserializes an std::string. Enter it in debug mode. For each instance of string deserialized you will get:
HEAP[SerializationTest.exe]: Invalid Address specified to RtlFreeHeap( 003E0000, 0047AC74 )
and the debugger will stop at:
template<class CharType> bool basic_xml_grammar<CharType>::parse_string(IStream & is, StringType & s){ ... s = rv.contents;
It wont halt the application and deserialization seems to work but this completely messes up debug sessions because amount of stops at these alarms quickly gets unbearable.
Note:
See TracTickets
for help on using tickets.
without a suggest patch there's no much I can do about this. Serialization does allocate stuff on the stack for certain circumstances. Maybe the debugger (which one) is overly sensitive to this. The most common problem with serializaton/deserializaiton of string is forgetting to use
#include <boost/serialization/string.hpp>
RObert Ramey