pmix: Increment the reference count in PMIx_Init
The reference counting was broken which led PMIx_Finalize to release resources early. This fixes the "use after free" scenarios that I encountered. (based on commit pmix/master@abfaa4c)
Этот коммит содержится в:
родитель
e7433fcb44
Коммит
75233573d1
@ -248,6 +248,7 @@ int PMIx_Init(pmix_proc_t *proc)
|
||||
(void)strncpy(proc->nspace, pmix_globals.myid.nspace, PMIX_MAX_NSLEN);
|
||||
proc->rank = pmix_globals.myid.rank;
|
||||
}
|
||||
++pmix_globals.init_cntr;
|
||||
return PMIX_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -258,6 +258,7 @@ int PMIx_Init(pmix_proc_t *proc)
|
||||
(void)strncpy(proc->nspace, pmix_globals.myid.nspace, PMIX_MAX_NSLEN);
|
||||
proc->rank = pmix_globals.myid.rank;
|
||||
}
|
||||
++pmix_globals.init_cntr;
|
||||
return PMIX_SUCCESS;
|
||||
}
|
||||
/* if we don't see the required info, then we cannot init */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user