From: Martin Quinson Date: Mon, 23 Oct 2023 16:10:31 +0000 (+0200) Subject: Correctly check the params of Sendrecv for buffer being disjoint X-Git-Tag: v3.35~89^2~66 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/7c02fd28b14dbf8f4461fd4ac1e78f4791023d27 Correctly check the params of Sendrecv for buffer being disjoint --- diff --git a/src/smpi/bindings/smpi_pmpi_request.cpp b/src/smpi/bindings/smpi_pmpi_request.cpp index 2fb4d0e118..8cf9b41312 100644 --- a/src/smpi/bindings/smpi_pmpi_request.cpp +++ b/src/smpi/bindings/smpi_pmpi_request.cpp @@ -381,7 +381,7 @@ 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, + CHECK_ARGS(sendbuf == recvbuf && sendcount > 0 && recvcount > 0, MPI_ERR_BUFFER, "%s: Invalid parameters 1 and 6: sendbuf and recvbuf must be disjoint", __func__); CHECK_TAG(10, recvtag) CHECK_COMM(11)