]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Merge from trunk, r12887 (n-i-bz: Fix false positives in
authorJulian Seward <jseward@acm.org>
Sun, 2 Sep 2012 20:31:39 +0000 (20:31 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 2 Sep 2012 20:31:39 +0000 (20:31 +0000)
count_from_Status etc al.)

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_8_BRANCH@12940

mpi/libmpiwrap.c

index 4bd6aac092967e98547550232a46407caf1c6de6..c03393e75f4a6d0f4db264e1e2e629de42cb68a3 100644 (file)
@@ -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);