id summary reporter owner description type status milestone component version severity resolution keywords cc 13563 Error deserializing empty forward_list Maximiliano Pin Robert Ramey "Deserializing an empty forward_list is broken if the elements aren't default constructible (with old compilers it's enough that elements have a non-trivial default constructor). A patch is attached. The problem is that the first element is always loaded first, even if the list is empty. The result may be a crash or any undefined behavior, since deserialization goes out of sync. Test case: {{{ #include #include #include #include #include #include struct Foo { int x; Foo(int a) : x(a) {}; template void serialize(Archive& ar, const unsigned int) { ar & x; } private: friend class boost::serialization::access; Foo() = default; }; int main() { std::forward_list flist; std::ostringstream oss; boost::archive::binary_oarchive oa{oss}; oa << flist; std::istringstream iss{oss.str()}; boost::archive::binary_iarchive ia{iss}; ia >> flist; } }}} Results in: {{{ terminate called after throwing an instance of 'boost::archive::archive_exception' what(): input stream error Aborted (core dumped) }}}" Patches new To Be Determined serialization Boost 1.67.0 Showstopper