Skip to content

Commit 34d590e

Browse files
committed
pml/ob1: Fix segmentation fault on CUDA path.
Fix segfault due to mca_pml_ob1_cuda_need_buffers not handling the case of the endpoint not being there. Calling mca_bml_get_endpoint() seems to fix the problem. Fixes open-mpi/ompi#1402
1 parent 7f1300d commit 34d590e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ompi/mca/pml/ob1/pml_ob1_cuda.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,7 @@ int mca_pml_ob1_cuda_need_buffers(void * rreq,
156156
mca_btl_base_module_t* btl)
157157
{
158158
mca_pml_ob1_recv_request_t* recvreq = (mca_pml_ob1_recv_request_t*)rreq;
159-
mca_bml_base_endpoint_t* bml_endpoint =
160-
(mca_bml_base_endpoint_t*)recvreq->req_recv.req_base.req_proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML];
159+
mca_bml_base_endpoint_t* bml_endpoint = mca_bml_base_get_endpoint (recvreq->req_recv.req_base.req_proc);
161160
mca_bml_base_btl_t *bml_btl = mca_bml_base_btl_array_find(&bml_endpoint->btl_send, btl);
162161

163162
/* A btl could be in the rdma list but not in the send list so check there also */

0 commit comments

Comments
 (0)