diff --git a/ompi/include/ompi/memchecker.h b/ompi/include/ompi/memchecker.h index 6ba22e6016..ef59948137 100644 --- a/ompi/include/ompi/memchecker.h +++ b/ompi/include/ompi/memchecker.h @@ -10,6 +10,7 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * + * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -100,6 +101,10 @@ static inline int memchecker_call (int (*f)(void *, size_t), const void * addr, return OMPI_SUCCESS; } + if ((0 == count) || (0 == datatype->super.size)) { + return OMPI_SUCCESS; + } + if( datatype->super.size == (size_t) (datatype->super.true_ub - datatype->super.true_lb) ) { /* We have a contiguous type. */ f( (void*)addr , datatype->super.size * count );