Don't write more iovec than expected.
This commit was SVN r20375.
Этот коммит содержится в:
родитель
ecdcda9268
Коммит
2d4a668540
@ -85,6 +85,7 @@ ompi_convertor_raw( ompi_convertor_t* pConvertor,
|
|||||||
size_t blength = ompi_ddt_basicDatatypes[pElem->elem.common.type]->size;
|
size_t blength = ompi_ddt_basicDatatypes[pElem->elem.common.type]->size;
|
||||||
source_base += pElem->elem.disp;
|
source_base += pElem->elem.disp;
|
||||||
if( blength == pElem->elem.extent ) { /* no resized data */
|
if( blength == pElem->elem.extent ) { /* no resized data */
|
||||||
|
if( index < *iov_count ) {
|
||||||
blength *= count_desc;
|
blength *= count_desc;
|
||||||
/* now here we have a basic datatype */
|
/* now here we have a basic datatype */
|
||||||
OMPI_DDT_SAFEGUARD_POINTER( source_base, blength, pConvertor->pBaseBuf,
|
OMPI_DDT_SAFEGUARD_POINTER( source_base, blength, pConvertor->pBaseBuf,
|
||||||
@ -96,6 +97,8 @@ ompi_convertor_raw( ompi_convertor_t* pConvertor,
|
|||||||
source_base += blength;
|
source_base += blength;
|
||||||
raw_data += blength;
|
raw_data += blength;
|
||||||
index++;
|
index++;
|
||||||
|
count_desc = 0;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
for( i = count_desc; (i > 0) && (index < *iov_count); i--, index++ ) {
|
for( i = count_desc; (i > 0) && (index < *iov_count); i--, index++ ) {
|
||||||
OMPI_DDT_SAFEGUARD_POINTER( source_base, blength, pConvertor->pBaseBuf,
|
OMPI_DDT_SAFEGUARD_POINTER( source_base, blength, pConvertor->pBaseBuf,
|
||||||
@ -172,7 +175,6 @@ ompi_convertor_raw( ompi_convertor_t* pConvertor,
|
|||||||
pos_desc += pElem->loop.items + 1;
|
pos_desc += pElem->loop.items + 1;
|
||||||
goto update_loop_description;
|
goto update_loop_description;
|
||||||
}
|
}
|
||||||
/* Save the stack with the correct last_count value. */
|
|
||||||
}
|
}
|
||||||
local_disp = (ptrdiff_t)source_base - local_disp;
|
local_disp = (ptrdiff_t)source_base - local_disp;
|
||||||
PUSH_STACK( pStack, pConvertor->stack_pos, pos_desc, DT_LOOP, count_desc,
|
PUSH_STACK( pStack, pConvertor->stack_pos, pos_desc, DT_LOOP, count_desc,
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user