[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1rc1-9-gb6d4dde

mysql vizuser noreply at mpich.org
Fri Nov 8 20:49:21 CST 2013

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  b6d4dde351ff286bbe1e4f059d06654694c4b526 (commit)
      from  b2ec3e57ba40a4208c2c0af75cb2f67690d8fad0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------

commit b6d4dde351ff286bbe1e4f059d06654694c4b526
Author: Rob Latham <robl at mcs.anl.gov>
Date:   Fri Nov 8 16:25:54 2013 -0600

    make MPIU_Assert more robust
    instead of assigning and then checking for overflow, check if the
    overflow will happen, and then assign.
    Signed-off-by: Antonio J. Pena <apenya at mcs.anl.gov>

diff --git a/src/include/mpiutil.h b/src/include/mpiutil.h
index f2fbaf0..d6e764d 100644
--- a/src/include/mpiutil.h
+++ b/src/include/mpiutil.h
@@ -239,9 +239,9 @@ int MPIR_Assert_fail_fmt(const char *cond, const char *file_name, int line_num,
 #define MPIU_Assign_trunc(dst_,src_,dst_type_)                                         \
     do {                                                                               \
-        dst_ = (dst_type_)(src_);                                                      \
         /* will catch some of the cases if the expr_inttype macros aren't available */ \
-        MPIU_Assert((dst_) == (src_));                                                 \
+        MPIU_Assert((src_) == (dst_type_)(src_));                                      \
+        dst_ = (dst_type_)(src_);                                                      \
     } while (0)


Summary of changes:
 src/include/mpiutil.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

MPICH primary repository

More information about the commits mailing list