From: Martin Quinson Date: Mon, 23 Oct 2023 02:42:11 +0000 (+0200) Subject: Fix a bug found by MBI: Buffers of MPI_Sendrecv() must be disjoint X-Git-Tag: v3.35~89^2~67 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/4018d70da5bc25676b845e3d857361ef09de588e Fix a bug found by MBI: Buffers of MPI_Sendrecv() must be disjoint --- diff --git a/src/smpi/bindings/smpi_pmpi_request.cpp b/src/smpi/bindings/smpi_pmpi_request.cpp index 94bb62be2a..2fb4d0e118 100644 --- a/src/smpi/bindings/smpi_pmpi_request.cpp +++ b/src/smpi/bindings/smpi_pmpi_request.cpp @@ -381,6 +381,8 @@ int PMPI_Sendrecv(const void* sendbuf, int sendcount, MPI_Datatype sendtype, int CHECK_TYPE(8, recvtype) CHECK_BUFFER(1, sendbuf, sendcount, sendtype) CHECK_BUFFER(6, recvbuf, recvcount, recvtype) + CHECK_ARGS((sendbuf) != (recvbuf), MPI_ERR_BUFFER, + "%s: Invalid parameters 1 and 6: sendbuf and recvbuf must be disjoint", __func__); CHECK_TAG(10, recvtag) CHECK_COMM(11) const SmpiBenchGuard suspend_bench;