Commit 59d05988 authored by David Goodell's avatar David Goodell
Browse files

[svn-r6952] bugfix tt#1060: add a simple buffer aliasing check to MPI_Allgather

Thanks to Joe Ratterman @ IBM for the bug report.

No reviewer.
parent 99595a2a
......@@ -873,6 +873,10 @@ int MPI_Allgather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
}
MPIR_ERRTEST_USERBUFFER(recvbuf,recvcount,recvtype,mpi_errno);
/* catch common aliasing cases */
if (sendbuf != MPI_IN_PLACE && sendtype == recvtype && recvcount != 0 && sendcount != 0)
MPIR_ERRTEST_ALIAS_COLL(sendbuf,recvbuf,mpi_errno);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
}
MPID_END_ERROR_CHECKS;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment