Fix an annoying segfault caused by incorrect indentation in a loop that causes the buffer to not be created prior to packing.
Этот коммит содержится в:
родитель
f86a0c9f33
Коммит
9bc384282a
@ -330,8 +330,8 @@ void pmix_server_process_message(pmix_server_peer_t *peer)
|
|||||||
* was actually provided so we don't hang if no modex data is being given */
|
* was actually provided so we don't hang if no modex data is being given */
|
||||||
OPAL_LIST_FOREACH_SAFE(req, nextreq, &pmix_server_pending_dmx_reqs, pmix_server_dmx_req_t) {
|
OPAL_LIST_FOREACH_SAFE(req, nextreq, &pmix_server_pending_dmx_reqs, pmix_server_dmx_req_t) {
|
||||||
if (0 == opal_compare_proc(id, req->target)) {
|
if (0 == opal_compare_proc(id, req->target)) {
|
||||||
/* yes - deliver a copy */
|
|
||||||
reply = OBJ_NEW(opal_buffer_t);
|
reply = OBJ_NEW(opal_buffer_t);
|
||||||
|
/* yes - deliver a copy */
|
||||||
if (NULL == req->proxy) {
|
if (NULL == req->proxy) {
|
||||||
/* pack the status */
|
/* pack the status */
|
||||||
ret = OPAL_SUCCESS;
|
ret = OPAL_SUCCESS;
|
||||||
@ -370,59 +370,59 @@ void pmix_server_process_message(pmix_server_peer_t *peer)
|
|||||||
OBJ_DESTRUCT(&buf);
|
OBJ_DESTRUCT(&buf);
|
||||||
/* pass the local blob(s) */
|
/* pass the local blob(s) */
|
||||||
opal_dss.copy_payload(reply, &blocal);
|
opal_dss.copy_payload(reply, &blocal);
|
||||||
}
|
/* use the PMIX send to return the data */
|
||||||
/* use the PMIX send to return the data */
|
PMIX_SERVER_QUEUE_SEND(req->peer, req->tag, reply);
|
||||||
PMIX_SERVER_QUEUE_SEND(req->peer, req->tag, reply);
|
} else {
|
||||||
} else {
|
/* pack the id of the requested proc */
|
||||||
/* pack the id of the requested proc */
|
if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &id, 1, OPAL_NAME))) {
|
||||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &id, 1, OPAL_NAME))) {
|
ORTE_ERROR_LOG(rc);
|
||||||
ORTE_ERROR_LOG(rc);
|
OBJ_RELEASE(reply);
|
||||||
OBJ_RELEASE(reply);
|
OBJ_DESTRUCT(&xfer);
|
||||||
OBJ_DESTRUCT(&xfer);
|
OBJ_RELEASE(sig);
|
||||||
OBJ_RELEASE(sig);
|
return;
|
||||||
return;
|
}
|
||||||
}
|
/* pack the status */
|
||||||
/* pack the status */
|
ret = OPAL_SUCCESS;
|
||||||
ret = OPAL_SUCCESS;
|
if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &ret, 1, OPAL_INT))) {
|
||||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &ret, 1, OPAL_INT))) {
|
ORTE_ERROR_LOG(rc);
|
||||||
ORTE_ERROR_LOG(rc);
|
OBJ_RELEASE(reply);
|
||||||
OBJ_RELEASE(reply);
|
return;
|
||||||
return;
|
}
|
||||||
}
|
/* always pass the hostname */
|
||||||
/* always pass the hostname */
|
OBJ_CONSTRUCT(&buf, opal_buffer_t);
|
||||||
OBJ_CONSTRUCT(&buf, opal_buffer_t);
|
OBJ_CONSTRUCT(&kv, opal_value_t);
|
||||||
OBJ_CONSTRUCT(&kv, opal_value_t);
|
kv.key = strdup(PMIX_HOSTNAME);
|
||||||
kv.key = strdup(PMIX_HOSTNAME);
|
kv.type = OPAL_STRING;
|
||||||
kv.type = OPAL_STRING;
|
kv.data.string = strdup(orte_process_info.nodename);
|
||||||
kv.data.string = strdup(orte_process_info.nodename);
|
kp = &kv;
|
||||||
kp = &kv;
|
if (OPAL_SUCCESS != (rc = opal_dss.pack(&buf, &kp, 1, OPAL_VALUE))) {
|
||||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(&buf, &kp, 1, OPAL_VALUE))) {
|
ORTE_ERROR_LOG(rc);
|
||||||
ORTE_ERROR_LOG(rc);
|
OBJ_RELEASE(reply);
|
||||||
OBJ_RELEASE(reply);
|
OBJ_DESTRUCT(&buf);
|
||||||
OBJ_DESTRUCT(&buf);
|
OBJ_DESTRUCT(&kv);
|
||||||
|
return;
|
||||||
|
}
|
||||||
OBJ_DESTRUCT(&kv);
|
OBJ_DESTRUCT(&kv);
|
||||||
return;
|
/* pack the hostname blob */
|
||||||
}
|
bptr = &buf;
|
||||||
OBJ_DESTRUCT(&kv);
|
if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &bptr, 1, OPAL_BUFFER))) {
|
||||||
/* pack the hostname blob */
|
ORTE_ERROR_LOG(rc);
|
||||||
bptr = &buf;
|
OBJ_RELEASE(reply);
|
||||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &bptr, 1, OPAL_BUFFER))) {
|
OBJ_DESTRUCT(&xfer);
|
||||||
ORTE_ERROR_LOG(rc);
|
OBJ_DESTRUCT(&buf);
|
||||||
OBJ_RELEASE(reply);
|
return;
|
||||||
OBJ_DESTRUCT(&xfer);
|
}
|
||||||
OBJ_DESTRUCT(&buf);
|
OBJ_DESTRUCT(&buf);
|
||||||
return;
|
/* pass the remote blob(s) */
|
||||||
|
opal_dss.copy_payload(reply, &bremote);
|
||||||
|
/* use RML to send the response */
|
||||||
|
orte_rml.send_buffer_nb(&req->proxy->name, reply,
|
||||||
|
ORTE_RML_TAG_DIRECT_MODEX_RESP,
|
||||||
|
orte_rml_send_callback, NULL);
|
||||||
}
|
}
|
||||||
OBJ_DESTRUCT(&buf);
|
opal_list_remove_item(&pmix_server_pending_dmx_reqs, &req->super);
|
||||||
/* pass the remote blob(s) */
|
OBJ_RELEASE(req);
|
||||||
opal_dss.copy_payload(reply, &bremote);
|
|
||||||
/* use RML to send the response */
|
|
||||||
orte_rml.send_buffer_nb(&req->proxy->name, reply,
|
|
||||||
ORTE_RML_TAG_DIRECT_MODEX_RESP,
|
|
||||||
orte_rml_send_callback, NULL);
|
|
||||||
}
|
}
|
||||||
opal_list_remove_item(&pmix_server_pending_dmx_reqs, &req->super);
|
|
||||||
OBJ_RELEASE(req);
|
|
||||||
}
|
}
|
||||||
OBJ_DESTRUCT(&blocal);
|
OBJ_DESTRUCT(&blocal);
|
||||||
OBJ_DESTRUCT(&bremote);
|
OBJ_DESTRUCT(&bremote);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user