Skip to content

Commit 4b718dd

Browse files
authored
Merge pull request #2367 from ggouaillardet/topic/v2.x/pml_ob1_recv_memchecker
v2.x: pml/ob1: mca_pml_ob1_recv must have memchecker mark the buffer as def…
2 parents 8779796 + 842b6fb commit 4b718dd

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
@@ -133,6 +134,17 @@ int mca_pml_ob1_recv(void *addr,
133134

134135
rc = recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR;
135136

137+
if (recvreq->req_recv.req_base.req_pml_complete) {
138+
/* make buffer defined when the request is compeleted,
139+
and before releasing the objects. */
140+
MEMCHECKER(
141+
memchecker_call(&opal_memchecker_base_mem_defined,
142+
recvreq->req_recv.req_base.req_addr,
143+
recvreq->req_recv.req_base.req_count,
144+
recvreq->req_recv.req_base.req_datatype);
145+
);
146+
}
147+
136148
#if OMPI_ENABLE_THREAD_MULTIPLE
137149
MCA_PML_OB1_RECV_REQUEST_RETURN(recvreq);
138150
#else

0 commit comments

Comments
 (0)