Opened 15 years ago
Closed 15 years ago
#1037 closed Bugs (invalid)
boost.serialization : invalid pointer dependant upon serialization order
Reported by: | Owned by: | Robert Ramey | |
---|---|---|---|
Milestone: | To Be Determined | Component: | serialization |
Version: | Boost 1.34.0 | Severity: | Not Applicable |
Keywords: | Cc: |
Description
thierry@thierry-laptop:~/$ ./a.out 4=(nil) 3=0x622150 2=0x622150 1=0x622140 0=0x622140 terminate called after throwing an instance of 'boost::archive::archive_exception'
what(): pointer conflict
Aborted (core dumped)
attached file reproduces bug and comment on where change order can make code pass
env : ubuntu 7.04, gcc 4.1.1
Attachments (1)
Change History (6)
by , 15 years ago
Attachment: | pointerconflict.cpp added |
---|
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Owner: | set to |
---|
follow-up: 4 comment:3 by , 15 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:4 by , 15 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Replying to ramey:
Just calling for more comments if no fixes.
If this is an error, isn't it an error in both implementation, and shall raise exception in both cases?
Could you then add to documentation (in tutorial) how to save vectors of scalar type that can be pointed to by other stucture?
Still, I wonder why this is considered a "user" bug, because it seems contradictory to the library goals. When it is limitation i would be prefer early emphasis on doc.
comment:5 by , 15 years ago
Resolution: | → invalid |
---|---|
Severity: | Showstopper → Not Applicable |
Status: | reopened → closed |
This is explained in the documentation under Reference/Special Considerations/Archive Exceptions/pointer conflict.
This occurs when an object is first loaded through a pointer, thereby creating a new object, then loading the same object to a specific place. With no exception, we would end up with two objects where we started with one before. There is no obvious way to address this without making the serialization loading multi-pass - which would create a whole host of other issues.
Note that questions like this are much better posted on the mailing list rather than filing a "bug report"
Robert Ramey
User error.
Described in documentation under "archive exceptions"
Robert Ramey