Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Correctly initialize simdata->comm when marked as isused.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 3 Feb 2012 10:27:49 +0000 (11:27 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 3 Feb 2012 10:34:50 +0000 (11:34 +0100)
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).

src/msg/msg_gos.c
src/msg/msg_mailbox.c

index c97b980..d02ffa7 100644 (file)
@@ -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 */
index 4eb5053..22917b6 100644 (file)
@@ -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++;