Opened 12 years ago
Last modified 11 years ago
#5499 new Bugs
Serialization backward compatability
Reported by: | Owned by: | Robert Ramey | |
---|---|---|---|
Milestone: | To Be Determined | Component: | serialization |
Version: | Boost 1.46.1 | Severity: | Showstopper |
Keywords: | serialization compatability | Cc: |
Description
Boost 1.33.1 serializes class_id_type as int_least16_t (archive version 3). Current boost tries to load it as int for archive of version 6 and earlier. On my platform (VS2005) int is 32 bits, hence the deserialization fails.
The attached code creates and successfully loads 'out.boost103301.dat' when compiling with boost 1.33.1 and crashes due to failed assert in class_id_type constructor when loading with boost 1.46.1.
I'm upgrading from 1.33.1 to boost 1.46.1 now, so I mark it as 'Showstopper'.
Attachments (1)
Note:
See TracTickets
for help on using tickets.
Same problem while upgrading from 1.36.0 to 1.48.0. I had checked basic_binary_iarchive::load_override for class_id_type - from versions 1.32.0 to 1.43.0 (serialization library versions from 3 to 7) its identical:
In version 1.44.0 (library version 8) load_override for class_id_type is not specialized in basic_binary_iarchive. In version 1.48.0 I see
I do not understand, why author made difference between version 7 and earlier versions. From my point of view, it is an error (introduced in version 1.45.0). Following code can read my old files (library versions 3-5) :