id summary reporter owner description type status milestone component version severity resolution keywords cc 7240 serialization backward compatibility issue with class_id_type attribute ggagniard@… Robert Ramey "There is a backward compatibility issue in current boost::serialization around the class_id_type attribute. It is actually impossible to read binary archives written with boost 1.39 (format 5) with a boost release > 1.43. For instance, with boost 1.47.0 : test_serialization: /home/ggagniard/dev/boost-1.47.0.bug/include/boost/archive/basic_archive.hpp:116: boost::archive::class_id_type::class_id_type(int): Assertion `t_ <= boost::integer_traits::const_max' failed. Please note that the same error still occurs with boost 1.50.0, the current stable release. After having a look at the class_id_type serialization in binary archives, I think I found the culprit : In boost/archive/basic_binary_iarchive.hpp : {{{ void load_override(class_id_type & t, int version){ library_version_type lvt = this->get_library_version(); if(boost::archive::library_version_type(7) < lvt){ this->detail_common_iarchive::load_override(t, version); } else if(boost::archive::library_version_type(6) < lvt){ int_least16_t x=0; * this->This() >> x; t = boost::archive::class_id_type(x); } else{ int x=0; * this->This() >> x; t = boost::archive::class_id_type(x); } } }}} Here, archives whose version <= 6 get their class_id_type read as an int ... However, in boost 1.43 (format 7) : {{{ void load_override(class_id_type & t, int){ // upto 32K classes int_least16_t x=0; * this->This() >> x; t = class_id_type(x); } }}} It is clear than any library version <= 7 have their class_id_type serialized as a int_least16_t, so the current load_override method is incorrect for versions <= 6 ..." Patches new To Be Determined serialization Boost 1.50.0 Showstopper