[mvapich-discuss] osu_cas_latency in OMB v.5.4.2 corrupts memory

Byrne, John (Labs) john.l.byrne at hpe.com
Thu Jul 12 19:10:17 EDT 2018


The immediate problem appears that the xxx_original arrays sizes in osu_cas_latency.c are MYBUFSIZE  (MAX_MESSAGE_SIZE). So, with the default opts.max_message_size of MAX_MESSAGE_SIZE (process_options() overwrites the value set at the beginning of main()), when allocate_atomic_memory() aligns the buffer pointer to page_size there is no padding available in the array and then the following memset(,,MAX_MESSAGE_SIZE) goes past the end of the buffer. The trivial overkill fix is to declare the arrays with size ONEBUFSIZE; however, I really don't understand why the allocate_memory_one_sided() and alloc_atomic_memory() routines don't simply allocate memory using posix_memalign() in the non-device-memory case rather than aligning the passed-in original buffer and using that: it just seems like asking for trouble.

John Byrne

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cse.ohio-state.edu/pipermail/mvapich-discuss/attachments/20180712/76db6bc8/attachment.html>


More information about the mvapich-discuss mailing list