Skip to content

Commit 023d18a

Browse files
committed
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 <[email protected]>
1 parent f11b0c7 commit 023d18a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

ompi/mca/pml/ob1/pml_ob1_irecv.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "pml_ob1_recvfrag.h"
3131
#include "ompi/peruse/peruse-internal.h"
3232
#include "ompi/message/message.h"
33+
#include "ompi/memchecker.h"
3334

3435
/**
3536
* Single usage request. As we allow recursive calls to recv
@@ -139,6 +140,17 @@ int mca_pml_ob1_recv(void *addr,
139140

140141
rc = recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR;
141142

143+
if (recvreq->req_recv.req_base.req_pml_complete) {
144+
/* make buffer defined when the request is compeleted,
145+
and before releasing the objects. */
146+
MEMCHECKER(
147+
memchecker_call(&opal_memchecker_base_mem_defined,
148+
recvreq->req_recv.req_base.req_addr,
149+
recvreq->req_recv.req_base.req_count,
150+
recvreq->req_recv.req_base.req_datatype);
151+
);
152+
}
153+
142154
if (OPAL_UNLIKELY(ompi_mpi_thread_multiple || NULL != mca_pml_ob1_recvreq)) {
143155
MCA_PML_OB1_RECV_REQUEST_RETURN(recvreq);
144156
} else {

0 commit comments

Comments
 (0)