Skip to content

Commit 8a3a724

Browse files
committed
Properly initialize group pointer passed to ompi_group_from_pset
The `group` pointer passed from `ompi_comm_init` is checked for equality with MPI_GROUP_NULL in `ompi_group_from_pset` but is never initialized. Valgrind complains about a jump based on uninitialized values. Stack values are never default initialized so we have to explicitly initialize it to `NULL`. Signed-off-by: Joseph Schuchart <schuchart@icl.utk.edu>
1 parent 796f46b commit 8a3a724

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ompi/communicator/comm_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ int ompi_comm_init(void)
192192

193193
int ompi_comm_init_mpi3 (void)
194194
{
195-
ompi_group_t *group;
196195
int ret;
196+
ompi_group_t *group = NULL;
197197

198198
/* the intrinsic communicators have been initialized */
199199
ompi_comm_intrinsic_init = true;

0 commit comments

Comments
 (0)