Skip to content

Commit

Permalink
Respect the unpack boundaries.
Browse files Browse the repository at this point in the history
As Gilles suggested on #2535 the opal_unpack_general_function was
unpacking based on the requested count and not on the amount of packed
data provided.
Fixes #2535.

Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
  • Loading branch information
bosilca committed May 5, 2017
1 parent 9a741e5 commit 56ac2ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion opal/datatype/opal_datatype_unpack.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2014 The University of Tennessee and The University
* Copyright (c) 2004-2017 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
Expand Down Expand Up @@ -502,6 +502,7 @@ opal_unpack_general_function( opal_convertor_t* pConvertor,
conv_ptr = pConvertor->pBaseBuf + pStack->disp;
pos_desc++; /* advance to the next data */
UPDATE_INTERNAL_COUNTERS( description, pos_desc, pElem, count_desc );
if( 0 == iov_len_local ) goto complete_loop; /* escape if we're done */
continue;
}
conv_ptr += rc * description[pos_desc].elem.extent;
Expand Down

0 comments on commit 56ac2ec

Please sign in to comment.