Opened 10 years ago
Closed 10 years ago
#7384 closed Bugs (fixed)
Serializing binary object to text or xml reads outside specified memory
Reported by: | Owned by: | Robert Ramey | |
---|---|---|---|
Milestone: | To Be Determined | Component: | serialization |
Version: | Boost 1.51.0 | Severity: | Problem |
Keywords: | binary object serialization | Cc: |
Description
When writing a binary object (using make_binary_object) to a text or xml archive, the serialization seems to read beyond the specified size. Initially this error was reported by valgrind, and I then confirmed the file written by the archive changes when the data beyond the specified size varies. So it is reading at least 1 byte beyond the size specified to make_binary_object.
I have seen this on boost 1.49.0 and the current svn version.
A small program that reproduces this problem is attached, as well as the valgrind output I get when running this program if the extraSpace variable is set to 0. This program tests all of the possible values for the memory beyond the serializedSize and write them to files. The last letter (before the ==) then varies from A-P.
This was tested on linux.
Attachments (2)
Change History (5)
by , 10 years ago
Attachment: | boostSerializationTest.cpp added |
---|
by , 10 years ago
Attachment: | valgrindOut.txt added |
---|
follow-up: 2 comment:1 by , 10 years ago
comment:3 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I've made changes to code to address this specific issue. I've checked in the changes to the trunk. Please check to see that this problem is addressed.
Robert Ramey