Opened 15 years ago

Closed 15 years ago

#1037 closed Bugs (invalid)

boost.serialization : invalid pointer dependant upon serialization order

Reported by: tg38@… 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)

pointerconflict.cpp (2.3 KB ) - added by anonymous 15 years ago.

Download all attachments as: .zip

Change History (6)

by anonymous, 15 years ago

Attachment: pointerconflict.cpp added

comment:1 by ramey@…, 15 years ago

User error.

Described in documentation under "archive exceptions"

Robert Ramey

comment:2 by Eric Niebler, 15 years ago

Owner: set to Robert Ramey

comment:3 by Robert Ramey, 15 years ago

Resolution: invalid
Status: newclosed

in reply to:  3 comment:4 by tg38@…, 15 years ago

Resolution: invalid
Status: closedreopened

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 Robert Ramey, 15 years ago

Resolution: invalid
Severity: ShowstopperNot Applicable
Status: reopenedclosed

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

Note: See TracTickets for help on using tickets.