From: Julian Seward Date: Sun, 2 Sep 2012 20:31:39 +0000 (+0000) Subject: Merge from trunk, r12887 (n-i-bz: Fix false positives in X-Git-Tag: svn/VALGRIND_3_8_1~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0a799585074319f4e535e699affa8e3c05d868d;p=thirdparty%2Fvalgrind.git Merge from trunk, r12887 (n-i-bz: Fix false positives in count_from_Status etc al.) git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_8_BRANCH@12940 --- diff --git a/mpi/libmpiwrap.c b/mpi/libmpiwrap.c index 4bd6aac092..c03393e75f 100644 --- a/mpi/libmpiwrap.c +++ b/mpi/libmpiwrap.c @@ -413,7 +413,9 @@ static __inline__ Bool count_from_Status( /*OUT*/int* recv_count, MPI_Status* status) { int n; + if (cONFIG_DER) VALGRIND_DISABLE_ERROR_REPORTING; int err = PMPI_Get_count(status, datatype, &n); + if (cONFIG_DER) VALGRIND_ENABLE_ERROR_REPORTING; if (err == MPI_SUCCESS) { *recv_count = n; return True; @@ -1107,6 +1109,7 @@ int WRAPPER_FOR(PMPI_Recv)(void *buf, int count, MPI_Datatype datatype, if (cONFIG_DER) VALGRIND_DISABLE_ERROR_REPORTING; CALL_FN_W_7W(err, fn, buf,count,datatype,source,tag,comm,status); if (cONFIG_DER) VALGRIND_ENABLE_ERROR_REPORTING; + make_mem_defined_if_addressable_if_success_untyped(err, status, sizeof(*status)); if (err == MPI_SUCCESS && count_from_Status(&recv_count,datatype,status)) { make_mem_defined_if_addressable(buf, recv_count, datatype); } @@ -1724,6 +1727,7 @@ int WRAPPER_FOR(PMPI_Sendrecv)( recvbuf,recvcount,recvtype,source,recvtag, comm,status); if (cONFIG_DER) VALGRIND_ENABLE_ERROR_REPORTING; + make_mem_defined_if_addressable_if_success_untyped(err, status, sizeof(*status)); if (err == MPI_SUCCESS && count_from_Status(&recvcount_actual,recvtype,status)) { make_mem_defined_if_addressable(recvbuf, recvcount_actual, recvtype);