From d1b5940e97ebb18535dce75e0c2b97d869a18d73 Mon Sep 17 00:00:00 2001 From: Dave Goodell Date: Thu, 29 Aug 2013 22:56:22 +0000 Subject: [PATCH] don't call OMPI_REQUEST_INIT in req constructor Calling OMPI_REQUEST_INIT puts the request into an _INACTIVE state instead of an _INVALID state, which we don't want if it's been simply been constructed, e.g., in a free_list. Without this change a future change to call destructors at free list destruction time will result in request dtor state assertion failures. Reviewed-by: bosilca cmr=v1.7.4:reviewer=bosilca This commit was SVN r29095. --- ompi/request/request.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ompi/request/request.c b/ompi/request/request.c index c62d0e7ad2..454ced48cc 100644 --- a/ompi/request/request.c +++ b/ompi/request/request.c @@ -10,7 +10,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2006-2013 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2012 Oak Ridge National Labs. All rights reserved. * $COPYRIGHT$ @@ -51,7 +51,11 @@ ompi_request_fns_t ompi_request_functions = { static void ompi_request_construct(ompi_request_t* req) { - OMPI_REQUEST_INIT(req, false); + /* don't call _INIT, we don't to set the request to _INACTIVE and there will + * be no matching _FINI invocation */ + req->req_state = OMPI_REQUEST_INVALID; + req->req_complete = false; + req->req_persistent = false; req->req_free = NULL; req->req_cancel = NULL; req->req_complete_cb = NULL;