1
1

- Coverity: Just as init.c -- we do not have a communicator yet;

so do not use OMPI_ERRHANDLER_RETURN which dereferences NULL...

This commit was SVN r15670.
Этот коммит содержится в:
Rainer Keller 2007-07-29 11:47:19 +00:00
родитель 2c5d07217d
Коммит 4ff78f8e2d

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

@ -37,7 +37,6 @@ int MPI_Init_thread(int *argc, char ***argv, int required,
int *provided)
{
int err;
MPI_Comm null = NULL;
OPAL_CR_TEST_CHECKPOINT_READY();
@ -84,6 +83,16 @@ int MPI_Init_thread(int *argc, char ***argv, int required,
} else {
err = ompi_mpi_init(0, NULL, required, provided);
}
OMPI_ERRHANDLER_RETURN(err, null, err, FUNC_NAME);
/* Since we don't have a communicator to invoke an errorhandler on
here, don't use the fancy-schmancy ERRHANDLER macros; they're
really designed for real communicator objects. Just use the
back-end function directly. */
if (MPI_SUCCESS != err) {
return ompi_errhandler_invoke(NULL, NULL, OMPI_ERRHANDLER_TYPE_COMM,
err < 0 ? ompi_errcode_get_mpi_code(err) :
err, FUNC_NAME);
}
return MPI_SUCCESS;
}