[Boost-bugs] [Boost C++ Libraries] #10444: MPI archive failure

Subject: [Boost-bugs] [Boost C++ Libraries] #10444: MPI archive failure
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-09-02 16:33:09


#10444: MPI archive failure
------------------------------+------------------------
 Reporter: brian.ventre@… | Owner: troyer
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: mpi
  Version: Boost 1.56.0 | Severity: Regression
 Keywords: |
------------------------------+------------------------
 Loading a serialized archive from MPI results in crashes/asserts.

 Compiler: MSVC 11.0 update 4

 Platform: Windows, x64

 Other notes: BOOST_MPI_HOMOGENEOUS is enabled

 When I load a boost::mpi archive (that was either sent over MPI or even
 packed within the same process), I end up with a crash (assert in debug
 versions). I think I've traced the problem to packed_oarchive.hpp.

 When saving, the compiler chooses the templated "save_override" function
 for archive::version_type. When loading, it chooses the specialized
 "load_override" for archive::version_type. I think this is because of
 missing "const" on the argument "t" for the versions of save_override
 specialized for archive::class_id_type & archive::version_type (since
 archive::version_type is actually const, the compiler can't use the non-
 const overload & defaults to the templated function)

 The root issue is that it saves 4 bytes for archive::version_type, but
 loads only 1. All future operations on the archive are thus mis-aligned
 (bad sizes are loaded for containers, etc.). I always use the homogeneous
 optimization, so I'm not sure if it is limited to this case.

 The same application code worked fine in 1.54.0. The new
 save_override/load_override functions for archive::version_type &
 archive::class_id_type were introduced somewhere between 1.54.0 & 1.56.0.
 (I did have to manually apply a fix to 1.54.0 for the zero-length loads in
 binary_buffer_imprimitive.hpp, but that issue has been resolved).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10444>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC