Skip to content

fix for buffer length check (rdma osc w/ odd datatypes) #3577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion ompi/mca/osc/rdma/osc_rdma_comm.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Copyright (c) 2016 Intel, Inc. All rights reserved.
* Copyright (c) 2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2017 IBM Corporation. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -793,7 +794,14 @@ static inline int ompi_osc_rdma_put_w_req (ompi_osc_rdma_sync_t *sync, const voi
return OMPI_SUCCESS;
}

ret = osc_rdma_get_remote_segment (module, peer, target_disp, target_datatype->super.size * target_count,
ptrdiff_t len, offset;
// a buffer defined by (buf, count, dt)
// will have data starting at buf+offset and ending len bytes later:
len = opal_datatype_span(&target_datatype->super, target_count, &offset);

// the below function wants arg4 to be the number of bytes after
// source_disp that the data ends, which is offset+len
ret = osc_rdma_get_remote_segment (module, peer, target_disp, offset+len,
&target_address, &target_handle);
if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) {
return ret;
Expand Down