Skip to content

Commit ee8bd04

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]> (back-ported from commit 023d18a)
1 parent 631a442 commit ee8bd04

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
mca_pml_ob1_recv_request_t *mca_pml_ob1_recvreq = NULL;
3536

@@ -128,6 +129,17 @@ int mca_pml_ob1_recv(void *addr,
128129

129130
rc = recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR;
130131

132+
if (recvreq->req_recv.req_base.req_pml_complete) {
133+
/* make buffer defined when the request is compeleted,
134+
and before releasing the objects. */
135+
MEMCHECKER(
136+
memchecker_call(&opal_memchecker_base_mem_defined,
137+
recvreq->req_recv.req_base.req_addr,
138+
recvreq->req_recv.req_base.req_count,
139+
recvreq->req_recv.req_base.req_datatype);
140+
);
141+
}
142+
131143
#if OMPI_ENABLE_THREAD_MULTIPLE
132144
MCA_PML_OB1_RECV_REQUEST_RETURN(recvreq);
133145
#else

0 commit comments

Comments
 (0)