Opened 6 years ago

Closed 6 years ago

#12549 closed Bugs (wontfix)

duplicate object created instead of throwing pointer_conflict

Reported by: Michał Brzozowski <miki@…> Owned by: Robert Ramey
Milestone: To Be Determined Component: serialization
Version: Boost 1.62.0 Severity: Problem
Keywords: Cc:

Description

Consider two classes, Father and Child, with a circular dependency. Father contains a Child member, and Child contains a pointer to Father.

There is a way to serialize and deserialize this structure in such a way that an extra object of type Child is created. I believe that pointer_conflict should be thrown during serialization instead.

The created XML archive (see attachment) is consistent, so the extra object is created during deserialization.

I observed this behavior in 1.57 and 1.62.

Attachments (2)

serial_crash.cpp (1.4 KB ) - added by Michał Brzozowski <miki@…> 6 years ago.
filename (447 bytes ) - added by Michał Brzozowski <miki@…> 6 years ago.
Serialized state

Download all attachments as: .zip

Change History (3)

by Michał Brzozowski <miki@…>, 6 years ago

Attachment: serial_crash.cpp added

by Michał Brzozowski <miki@…>, 6 years ago

Attachment: filename added

Serialized state

comment:1 by Robert Ramey, 6 years ago

Resolution: wontfix
Status: newclosed

OK - could imagine how this might occur. But it would take me a lot of time to figure out how to fix it. I just can't spend the required time for something I'd have to regard as more than a corner case - more like a pathological case. If you want to do the work and propose a fix I'll look at it, but for now I'm going to close this with "won't fix"

Note: See TracTickets for help on using tickets.