1
1

Merge pull request #3577 from markalle/pr/osc_rdma_rangecheck

fix for buffer length check (rdma osc w/ odd datatypes)
Этот коммит содержится в:
Josh Hursey 2017-05-26 10:44:33 -05:00 коммит произвёл GitHub
родитель 7d5cc8ebca df14cbf039
Коммит 4bfb0fcddd

Просмотреть файл

@ -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
@ -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;