1
1
openmpi/ompi/mca/io
Mark Allen d85cac8f1a fixing an unsafe usage of integer disps[] (romio321 gpfs)
There are a couple MPI_Alltoallv calls in ad_gpfs_aggrs.c where the
send/recv data comes from places like req[r].lens, and the send
buffer and send displacements for example were being calculated as
    sbuf = pick one of the reqs: req[bottom].lens
    sdisps[r] = req[r].lens - req[bottom].lens
which might be okay if the .lens was data inside of req[] so they'd
all be close to each other. But each .lens field is just a pointer
that's malloced, so those addresses can be all over the place, so the
integer-sized sdisps[] isn't safe.

I changed it to have a new extra array sbuf and rbuf for those two
Alltoallv calls, and copied the data into the sbuf from the same
locations it used to be setting up the sdisps[] at, and after the
Alltoallv I copy the data out of the new rbuf into the same
locations it used to be setting up the rdisps[] at.

For what it's worth I was able to get this to fail -np 2 on a GPFS
filesystem with hints romio_cb_write enable. I didn't whittle the
test down to something small, but it was failing in an
MPI_File_write_all call.

Signed-off-by: Mark Allen <markalle@us.ibm.com>
2019-04-23 16:01:55 -04:00
..
base io/base: fixes to file_delete selection logic 2018-08-27 16:01:48 -05:00
ompio io/ompio: add verification for data representations. 2018-10-16 12:45:33 -05:00
romio321 fixing an unsafe usage of integer disps[] (romio321 gpfs) 2019-04-23 16:01:55 -04:00
io.h fixes for Dave's get/set info code 2017-05-17 01:12:49 -04:00
Makefile.am Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00