1
1
Doing pointer math properly (e.g., incrementing by the right amount)
helps you not overflow buffers, cause random chaos, and contribute to
the heat death of the universe.  Sigh.

This commit was SVN r12015.

The following Trac tickets were found above:
  Ticket 236 --> https://svn.open-mpi.org/trac/ompi/ticket/236
Этот коммит содержится в:
Jeff Squyres 2006-10-05 16:43:10 +00:00
родитель fa01b9b9aa
Коммит 77a5eb3b69
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -108,7 +108,7 @@ void mpi_testsome_f(MPI_Fint *incount, MPI_Fint *array_of_requests,
if (!OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses)) {
for (i = 0; i < OMPI_FINT_2_INT(*outcount); ++i) {
if (!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) {
MPI_Status_c2f(&c_status[i], &array_of_statuses[i * sizeof(MPI_Status)]);
MPI_Status_c2f(&c_status[i], &array_of_statuses[i * (sizeof(MPI_Status) / sizeof(int))]);
}
}
}

Просмотреть файл

@ -110,7 +110,7 @@ void mpi_waitsome_f(MPI_Fint *incount, MPI_Fint *array_of_requests,
if (!OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses)) {
for (i = 0; i < OMPI_FINT_2_INT(*incount); ++i) {
if (!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) {
MPI_Status_c2f(&c_status[i], &array_of_statuses[i * sizeof(MPI_Status)]);
MPI_Status_c2f(&c_status[i], &array_of_statuses[i * (sizeof(MPI_Status) / sizeof(int))]);
}
}
}