From abb3cab9ddf7aa0b45926d7a52196c7656c6919c Mon Sep 17 00:00:00 2001 From: "John H. Hartman" Date: Wed, 20 Nov 2024 15:23:25 -0700 Subject: [PATCH] Best provider might be NULL Don't set the maximum messages size if the provider is NULL (no provider was found). Signed-off-by: John H. Hartman --- runtime/src/comm/ofi/comm-ofi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/runtime/src/comm/ofi/comm-ofi.c b/runtime/src/comm/ofi/comm-ofi.c index 757336937c17..08ae86374376 100644 --- a/runtime/src/comm/ofi/comm-ofi.c +++ b/runtime/src/comm/ofi/comm-ofi.c @@ -1617,9 +1617,11 @@ struct fi_info* findProvInList(struct fi_info* info, // Set the maximum message size if specified - best->ep_attr->max_msg_size = - chpl_env_rt_get_int("COMM_OFI_MAX_MSG_SIZE", - best->ep_attr->max_msg_size); + if (best) { + best->ep_attr->max_msg_size = + chpl_env_rt_get_int("COMM_OFI_MAX_MSG_SIZE", + best->ep_attr->max_msg_size); + } return (best == NULL) ? NULL : fi_dupinfo(best); }