Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] Patch to resolve valgrind warnings for 1.3.2
From: Number Cruncher (number.cruncher_at_[hidden])
Date: 2009-04-23 11:36:35

Although --enable-mem-debug resolves the issue, I get warnings about
uninitialized bytes in writev from the opal_if_t structs in opal_ifinit:

==25777== Syscall param writev(vector[...]) points to uninitialised byte(s)
==25777== at 0x34DE2C9F0C: writev (in /lib64/
==25777== by 0xAC233B: mca_oob_tcp_msg_send_handler (oob_tcp_msg.c:265)
==25777== by 0xABAC92: mca_oob_tcp_peer_send (oob_tcp_peer.c:197)
==25777== by 0xAC0A80: mca_oob_tcp_send_nb (oob_tcp_send.c:167)
==25777== by 0xAD025E: orte_rml_oob_send (rml_oob_send.c:137)
==25777== by 0xAD0CE3: orte_rml_oob_send_buffer (rml_oob_send.c:269)
==25777== by 0xAA50A6: allgather (grpcomm_bad_module.c:370)
==25777== by 0xAA592D: modex (grpcomm_bad_module.c:498)
==25777== by 0x92EE48: ompi_mpi_init (ompi_mpi_init.c:626)
==25777== by 0x95351C: PMPI_Init (pinit.c:80)

Since this isn't a performance critical part of Open MPI, why not follow
the reasoning already noted in a comment at opal/util/if.c:208 and
zero-out the struct even outside OMPI_ENABLE_MEM_DEBUG.

The attached patch makes this one-line change and clears up all valgrind
warnings (when --with-valgrind enabled).