From 43bd232fd061ded66edea0765bdc3703a10eef07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bouteiller?= Date: Wed, 31 Oct 2018 12:51:11 -0400 Subject: [PATCH] Resolve a recursive destruct on the iof proct in finalize MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Bouteiller --- orte/mca/iof/hnp/iof_hnp_read.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/orte/mca/iof/hnp/iof_hnp_read.c b/orte/mca/iof/hnp/iof_hnp_read.c index f6bda08a43..97d40aafaf 100644 --- a/orte/mca/iof/hnp/iof_hnp_read.c +++ b/orte/mca/iof/hnp/iof_hnp_read.c @@ -2,7 +2,7 @@ * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2011 The University of Tennessee and The University + * Copyright (c) 2004-2018 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, @@ -284,6 +284,8 @@ void orte_iof_hnp_read_local_handler(int fd, short event, void *cbdata) /* if we read 0 bytes from the stdout/err/diag, there is * nothing to output - release the appropriate event. * This will delete the read event and close the file descriptor */ + /* make sure we don't do recursive delete on the proct */ + OBJ_RETAIN(proct); if (rev->tag & ORTE_IOF_STDOUT) { orte_iof_base_static_dump_output(proct->revstdout); OBJ_RELEASE(proct->revstdout); @@ -305,6 +307,7 @@ void orte_iof_hnp_read_local_handler(int fd, short event, void *cbdata) /* this proc's iof is complete */ ORTE_ACTIVATE_PROC_STATE(&proct->name, ORTE_PROC_STATE_IOF_COMPLETE); } + OBJ_RELEASE(proct); return; }