From 7c02fd28b14dbf8f4461fd4ac1e78f4791023d27 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 23 Oct 2023 18:10:31 +0200 Subject: [PATCH] Correctly check the params of Sendrecv for buffer being disjoint --- src/smpi/bindings/smpi_pmpi_request.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.20.1