Skip to content

#1038 local variable size in saveRecvBuf needs to be of type std::size_t

Metadata

Property Value
Reported by Ansgar Burchardt (burchardt@igpm.rwth-aachen.de)
Reported at Feb 13, 2012 14:28
Type Bug Report
Version Git (pre2.4) [autotools]
Operating System Unspecified / All
Last edited by Christian Engwer (christi@conan.iwr.uni-heidelberg.de)
Last edited at Feb 13, 2012 17:04
Closed by Christian Engwer (christi@conan.iwr.uni-heidelberg.de)
Closed at Feb 13, 2012 17:04
Closed in version Unknown
Resolution Fixed
Comment applied to dune-istl 1536

Description

In the function saveRecvBuf, MPI_Unpack is used to read a std::size_t value into `size' so it needs the right type. Using an int causes other local variables to be overwritten by the function call:

352 MPI_Unpack(recvBuf, bufferSize, &pos, &size, 1, MPITraitsstd::size_t::getType(), comm);

A patch to change the type of size from int to std::size_t is attached.

Thanks to Jö for helping to find this bug.

Attachments