[Boost-bugs] [Boost C++ Libraries] #2220: Stack overflow in get_mpi_datatype() for struct declared as primitive_type

Subject: [Boost-bugs] [Boost C++ Libraries] #2220: Stack overflow in get_mpi_datatype() for struct declared as primitive_type
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-08-19 06:20:41


#2220: Stack overflow in get_mpi_datatype() for struct declared as primitive_type
--------------------------+-------------------------------------------------
 Reporter: Evgeny | Owner: dgregor
     Type: Bugs | Status: new
Milestone: Boost 1.36.0 | Component: mpi
  Version: Boost 1.36.0 | Severity: Problem
 Keywords: |
--------------------------+-------------------------------------------------
 struct MyStruct { int dummy; };

 BOOST_IS_MPI_DATATYPE(MyStruct);
 BOOST_CLASS_IMPLEMENTATION(MyStruct,primitive_type);
 ...
 get_mpi_datatype<MyStruct>() // produces stack overflow

 ## Call stack:
 get_mpi_datatype<MyStruct>();
 mpi_datatype_map.datatype<MyStruct>(...);
 mpi_datatype_oarchive::mpi_datatype_oarchive(const T& x);
 *this << x; //this serialization in turn calls get_mpi_datatype()

 Possible solution: use another mpi_datatype_oarchive constructor with no
 serialization (only for MPI_Type_struct() to be called)

-- 
Ticket URL: <http://svn.boost.org/trac/boost/ticket/2220>
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:49:58 UTC