From 842b6fb7ff47e752d8e2d5ddbc18327fb5f28529 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Mon, 7 Nov 2016 09:23:59 +0900 Subject: [PATCH] pml/ob1: mca_pml_ob1_recv must have memchecker mark the buffer as defined upon success this is generally done in mca_pml_ob1_recv_request_free(), but this is not invoked in via mca_pml_ob1_recv(), so do it manually Thanks Yvan Fournier for the report Signed-off-by: Gilles Gouaillardet (back-ported from commit open-mpi/ompi@023d18abae09b7f7f3dad96b41d9757a5e16ff22) --- ompi/mca/pml/ob1/pml_ob1_irecv.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ompi/mca/pml/ob1/pml_ob1_irecv.c b/ompi/mca/pml/ob1/pml_ob1_irecv.c index c925c9d0359..3e471398feb 100644 --- a/ompi/mca/pml/ob1/pml_ob1_irecv.c +++ b/ompi/mca/pml/ob1/pml_ob1_irecv.c @@ -30,6 +30,7 @@ #include "pml_ob1_recvfrag.h" #include "ompi/peruse/peruse-internal.h" #include "ompi/message/message.h" +#include "ompi/memchecker.h" /** * Single usage request. As we allow recursive calls to recv @@ -133,6 +134,17 @@ int mca_pml_ob1_recv(void *addr, rc = recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR; + if (recvreq->req_recv.req_base.req_pml_complete) { + /* make buffer defined when the request is compeleted, + and before releasing the objects. */ + MEMCHECKER( + memchecker_call(&opal_memchecker_base_mem_defined, + recvreq->req_recv.req_base.req_addr, + recvreq->req_recv.req_base.req_count, + recvreq->req_recv.req_base.req_datatype); + ); + } + #if OMPI_ENABLE_THREAD_MULTIPLE MCA_PML_OB1_RECV_REQUEST_RETURN(recvreq); #else