1
1

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)
Этот коммит содержится в:
Nysal Jan K.A 2016-03-27 04:11:25 -04:00
родитель e7433fcb44
Коммит 75233573d1
2 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -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 */