[mpich-discuss] ROMIO: path and filename length limit seems not verified
Eric Chamberland
Eric.Chamberland at giref.ulaval.ca
Mon Dec 15 12:40:32 CST 2014
Hi,
I just reported this to OpenMPI (http://www.open-mpi.org/community/lists/users/2014/12/25997.php), but when trying with MPICH
3.1.3, valgrind reports problems too.
Someone kindly proposed a patch, but since the code seems to be shared by both
projects, I thought I should report it here too (or should I not?)
With valgrind, we detect:
1- two "Invalid read of size 1"
2- Warning: invalid file descriptor -1 in syscall read()
3- Syscall param writev(vector[...]) points to uninitialised byte(s)
Setup to make this happens:
export
too_long=./this/is/a_very/long/path/that/contains/a/not/so/long/filename/but/trying/to/collectively/mpi_file_open/it/you/will/have/a/memory/corruption/resulting/of/invalide/writing/or/reading/past/the/end/of/one/or/some/hidden/strings/in/mpio/Simple/user/would/like/to/have/the/parameter/checked/and/an/error/returned/or/this/limit/removed
mkdir -p $too_long
echo "hello world." > $too_long/toto.txt
mpicc -o bug_MPI_File_open_path_too_long bug_MPI_File_open_path_too_long.c
mpirun -np 2 valgrind ./bug_MPI_File_open_path_too_long $too_long/toto.txt
This particular simple case doesn't segfault without valgrind, but in as
reported in my real case, it does!
Thanks!
Eric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_MPI_File_open_path_too_long.c
Type: text/x-csrc
Size: 2174 bytes
Desc: not available
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20141215/d3c176ad/attachment.bin>
-------------- next part --------------
_______________________________________________
discuss mailing list discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss
More information about the discuss
mailing list