[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2a2-142-gb210805
Service Account
noreply at mpich.org
Mon Feb 9 10:05:18 CST 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via b210805e1049f83f09545cc325b6c667b3ebfc69 (commit)
from 51fdbedcf352a56e5176192bfd665820cd64dadf (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/b210805e1049f83f09545cc325b6c667b3ebfc69
commit b210805e1049f83f09545cc325b6c667b3ebfc69
Author: Igor Ivanov <Igor.Ivanov at itseez.com>
Date: Mon Feb 9 14:36:02 2015 +0200
mpid/sched: Fix issue with schedule entries list processing
Call of MPID_Sched_cb callback function can force list memory
reallocation. As a result entry point proccessed before call
can become invalid. It should be set again after callback call.
Signed-off-by: Devendar Bureddy <devendar at mellanox.com>
Signed-off-by: Igor Ivanov <Igor.Ivanov at itseez.com>
Signed-off-by: Wesley Bland <wbland at anl.gov>
diff --git a/src/mpid/common/sched/mpid_sched.c b/src/mpid/common/sched/mpid_sched.c
index ecda136..b01a4d3 100644
--- a/src/mpid/common/sched/mpid_sched.c
+++ b/src/mpid/common/sched/mpid_sched.c
@@ -217,6 +217,8 @@ static int MPIDU_Sched_start_entry(struct MPIDU_Sched *s, size_t idx, struct MPI
MPIU_DBG_MSG_D(COMM, VERBOSE, "starting CB entry %d\n", (int) idx);
if (e->u.cb.cb_type == MPIDU_SCHED_CB_TYPE_1) {
ret_errno = e->u.cb.u.cb_p(r->comm, s->tag, e->u.cb.cb_state);
+ /* Sched entries list can be reallocated inside callback */
+ e = &s->entries[idx];
if (unlikely(ret_errno)) {
if (MPIR_ERR_NONE == r->errflag) {
if (MPIX_ERR_PROC_FAILED == MPIR_ERR_GET_CLASS(ret_errno)) {
@@ -232,6 +234,8 @@ static int MPIDU_Sched_start_entry(struct MPIDU_Sched *s, size_t idx, struct MPI
}
else if (e->u.cb.cb_type == MPIDU_SCHED_CB_TYPE_2) {
ret_errno = e->u.cb.u.cb2_p(r->comm, s->tag, e->u.cb.cb_state, e->u.cb.cb_state2);
+ /* Sched entries list can be reallocated inside callback */
+ e = &s->entries[idx];
if (unlikely(ret_errno)) {
if (MPIR_ERR_NONE == r->errflag) {
if (MPIX_ERR_PROC_FAILED == MPIR_ERR_GET_CLASS(ret_errno)) {
@@ -281,6 +285,8 @@ static int MPIDU_Sched_continue(struct MPIDU_Sched *s)
if (e->status == MPIDU_SCHED_ENTRY_STATUS_NOT_STARTED) {
mpi_errno = MPIDU_Sched_start_entry(s, i, e);
+ /* Sched entries list can be reallocated inside callback */
+ e = &s->entries[i];
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
}
-----------------------------------------------------------------------
Summary of changes:
src/mpid/common/sched/mpid_sched.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list