From: Arnaud Giersch Date: Fri, 3 Feb 2012 10:27:49 +0000 (+0100) Subject: Correctly initialize simdata->comm when marked as isused. X-Git-Tag: exp_20120216~67^2~1 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6929a75e852513610503d5c01bf928e1331e0d43 Correctly initialize simdata->comm when marked as isused. I hope that it's now the good fix for the segfault I got when running chord --cfg=contexts/stack_size:5 --log=msg_chord.thres:critical --cfg=network/model:Constant ./cluster_with_100000_hosts.xml ./chord100000.xml (see the backtrace in the message for commit 1380f1a). --- diff --git a/src/msg/msg_gos.c b/src/msg/msg_gos.c index c97b980396..d02ffa72cf 100644 --- a/src/msg/msg_gos.c +++ b/src/msg/msg_gos.c @@ -410,6 +410,7 @@ XBT_INLINE msg_comm_t MSG_task_isend_with_matching(m_task_t task, const char *al "This task is still being used somewhere else. You cannot send it now. Go fix your code!"); t_simdata->isused = 1; + t_simdata->comm = NULL; msg_global->sent_msg++; /* Send it by calling SIMIX network layer */ @@ -461,6 +462,7 @@ void MSG_task_dsend(m_task_t task, const char *alias, void_f_pvoid_t cleanup) "This task is still being used somewhere else. You cannot send it now. Go fix your code!"); t_simdata->isused = 1; + t_simdata->comm = NULL; msg_global->sent_msg++; /* Send it by calling SIMIX network layer */ diff --git a/src/msg/msg_mailbox.c b/src/msg/msg_mailbox.c index 4eb5053183..22917b66d1 100644 --- a/src/msg/msg_mailbox.c +++ b/src/msg/msg_mailbox.c @@ -147,6 +147,7 @@ MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, m_task_t task, "This task is still being used somewhere else. You cannot send it now. Go fix your code!"); t_simdata->isused=1; + t_simdata->comm = NULL; msg_global->sent_msg++;