Stop a segfault that results in zombied processes by checking for NULL prior to object release
Этот коммит содержится в:
родитель
7b73c868d5
Коммит
1748f44147
@ -379,19 +379,27 @@ static int hnp_close(const orte_process_name_t* peer,
|
||||
OPAL_LIST_FOREACH(proct, &mca_iof_hnp_component.procs, orte_iof_proc_t) {
|
||||
if (OPAL_EQUAL == orte_util_compare_name_fields(mask, &proct->name, peer)) {
|
||||
if (ORTE_IOF_STDIN & source_tag) {
|
||||
if (NULL != proct->stdin) {
|
||||
OBJ_RELEASE(proct->stdin);
|
||||
}
|
||||
++cnt;
|
||||
}
|
||||
if (ORTE_IOF_STDOUT & source_tag) {
|
||||
if (NULL != proct->revstdout) {
|
||||
OBJ_RELEASE(proct->revstdout);
|
||||
}
|
||||
++cnt;
|
||||
}
|
||||
if (ORTE_IOF_STDERR & source_tag) {
|
||||
if (NULL != proct->revstderr) {
|
||||
OBJ_RELEASE(proct->revstderr);
|
||||
}
|
||||
++cnt;
|
||||
}
|
||||
if (ORTE_IOF_STDDIAG & source_tag) {
|
||||
if (NULL != proct->revstddiag) {
|
||||
OBJ_RELEASE(proct->revstddiag);
|
||||
}
|
||||
++cnt;
|
||||
}
|
||||
/* if we closed them all, then remove this proc */
|
||||
|
@ -270,19 +270,27 @@ static int orted_close(const orte_process_name_t* peer,
|
||||
OPAL_LIST_FOREACH(proct, &mca_iof_orted_component.procs, orte_iof_proc_t) {
|
||||
if (OPAL_EQUAL == orte_util_compare_name_fields(mask, &proct->name, peer)) {
|
||||
if (ORTE_IOF_STDIN & source_tag) {
|
||||
if (NULL != proct->stdin) {
|
||||
OBJ_RELEASE(proct->stdin);
|
||||
}
|
||||
++cnt;
|
||||
}
|
||||
if (ORTE_IOF_STDOUT & source_tag) {
|
||||
if (NULL != proct->revstdout) {
|
||||
OBJ_RELEASE(proct->revstdout);
|
||||
}
|
||||
++cnt;
|
||||
}
|
||||
if (ORTE_IOF_STDERR & source_tag) {
|
||||
if (NULL != proct->revstderr) {
|
||||
OBJ_RELEASE(proct->revstderr);
|
||||
}
|
||||
++cnt;
|
||||
}
|
||||
if (ORTE_IOF_STDDIAG & source_tag) {
|
||||
if (NULL != proct->revstddiag) {
|
||||
OBJ_RELEASE(proct->revstddiag);
|
||||
}
|
||||
++cnt;
|
||||
}
|
||||
/* if we closed them all, then remove this proc */
|
||||
|
@ -34,6 +34,7 @@ int main(int argc, char* argv[])
|
||||
MPI_Abort(MPI_COMM_WORLD, errcode);
|
||||
} else {
|
||||
errcode = 0;
|
||||
sleep(99999999);
|
||||
}
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user