From ac7c907f8d0fc79f15fedcf9fabc41d29255618a Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 15 Aug 2014 21:52:36 +0000 Subject: [PATCH] usnic: ensure to have a safe destruction of an opal_list_item_t It turns out that we ''can'' get to the endpoint destructor with the endpoint still on the "endpoints needing ACKs" list. So if it's on the list, remove it first, and then DESTRUCT the opal_list_item_t. This prevents an assert() fail in debug builds. We'd like to let this soak over the weekend. cmr=v1.8.2:reviewer=dgoodell This commit was SVN r32546. --- opal/mca/btl/usnic/btl_usnic_endpoint.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opal/mca/btl/usnic/btl_usnic_endpoint.c b/opal/mca/btl/usnic/btl_usnic_endpoint.c index ebe7c942b8..651fa73c8e 100644 --- a/opal/mca/btl/usnic/btl_usnic_endpoint.c +++ b/opal/mca/btl/usnic/btl_usnic_endpoint.c @@ -113,8 +113,9 @@ static void endpoint_destruct(mca_btl_base_endpoint_t* endpoint) int rc; opal_btl_usnic_proc_t *proc; - /* We should not get here for an endpoint that is on the ACK list, - so it should be safe to unconditionally destruct the ack_li */ + if (endpoint->endpoint_ack_needed) { + opal_btl_usnic_remove_from_endpoints_needing_ack(endpoint); + } OBJ_DESTRUCT(&(endpoint->endpoint_ack_li)); /* Remove the endpoint from the all_endpoints list */