Hi,

When running under valgrind, I get warnings from each MPI process at MPI_Init time. The warnings come from function sec_basic.c at lines 70 and 71 (openmpi v1.8.1):

            my_cred.credential = strdup("12345");
my_cred.size = strlen(my_cred.credential)+1; // include the NULL

This is because strdup(3c) and strlen(3c) are apparently optimized to use 4-byte integer loads to speed up the copy and search operations, and "overrun" the malloced area. (In fact, since malloc tends to pad allocations, it is safe. But valgrind doesn't know that.)

Since the "12345" appears to be a dummy string, would it be ok to add a couple of additional characters in the strdup call to:

            my_cred.credential = strdup("1234567");

This gives an 8 byte string (counting the NULL) and quiets valgrind down.

Walter

Reply via email to