From ded408f485a9fe5bc95ef096274d52e26a933d54 Mon Sep 17 00:00:00 2001 From: "Nysal Jan K.A" Date: Wed, 11 Feb 2015 21:50:46 +0530 Subject: [PATCH] Fix a crash while closing libnbc If the free list initialization fails in libnbc_open() mca_coll_libnbc_component.active_requests remain uninitialized, resulting in a crash while closing the component --- ompi/mca/coll/libnbc/coll_libnbc_component.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ompi/mca/coll/libnbc/coll_libnbc_component.c b/ompi/mca/coll/libnbc/coll_libnbc_component.c index 311e20a9d8..4ef8a6126a 100644 --- a/ompi/mca/coll/libnbc/coll_libnbc_component.c +++ b/ompi/mca/coll/libnbc/coll_libnbc_component.c @@ -88,13 +88,13 @@ libnbc_open(void) int ret; OBJ_CONSTRUCT(&mca_coll_libnbc_component.requests, opal_free_list_t); + OBJ_CONSTRUCT(&mca_coll_libnbc_component.active_requests, opal_list_t); ret = opal_free_list_init (&mca_coll_libnbc_component.requests, sizeof(ompi_coll_libnbc_request_t), 8, OBJ_CLASS(ompi_coll_libnbc_request_t), 0, 0, 0, -1, 8, NULL, 0, NULL, NULL, NULL); if (OMPI_SUCCESS != ret) return ret; - OBJ_CONSTRUCT(&mca_coll_libnbc_component.active_requests, opal_list_t); /* note: active comms is the number of communicators who have had a non-blocking collective started */ mca_coll_libnbc_component.active_comms = 0;