From ab39110bc93e2c85bd456c7df17e4465c38778ba Mon Sep 17 00:00:00 2001 From: Hui Zhou <hzhou321@anl.gov> Date: Fri, 3 Jan 2025 23:13:54 -0600 Subject: [PATCH] ch4/proc: use calloc to zero MPIDI_global.avt_mgr.av_table0 We need ensure the extra fields, such as MPIDI_OFI_AV(av, all_dest), are initialized to NULL. --- src/mpid/ch4/src/ch4_proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mpid/ch4/src/ch4_proc.c b/src/mpid/ch4/src/ch4_proc.c index 56cb70b48c1..dad44ef8a67 100644 --- a/src/mpid/ch4/src/ch4_proc.c +++ b/src/mpid/ch4/src/ch4_proc.c @@ -164,7 +164,7 @@ int MPIDIU_avt_init(void) int size = MPIR_Process.size; int rank = MPIR_Process.rank; size_t table_size = sizeof(MPIDI_av_table_t) + size * sizeof(MPIDI_av_entry_t); - MPIDI_global.avt_mgr.av_table0 = (MPIDI_av_table_t *) MPL_malloc(table_size, MPL_MEM_ADDRESS); + MPIDI_global.avt_mgr.av_table0 = MPL_calloc(1, table_size, MPL_MEM_ADDRESS); MPIR_Assert(MPIDI_global.avt_mgr.av_table0); #if MPIDI_CH4_AVTABLE_USE_DDR