Wow, that is hilarious. I see no problem with adding the extra characters :-)
Scheduled it for 1.8.2 (copied you on ticket) On May 21, 2014, at 3:29 PM, W Spector <w...@earthlink.net> wrote: > 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 > _______________________________________________ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users