Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : set comm to NULL before creating them with simcall (MC compliant)
authorMarion Guthmuller <marion.guthmuller@loria.fr>
Fri, 4 Oct 2013 13:00:13 +0000 (15:00 +0200)
committerMarion Guthmuller <marion.guthmuller@loria.fr>
Fri, 4 Oct 2013 13:21:20 +0000 (15:21 +0200)
src/msg/msg_mailbox.c
src/simix/smx_user.c

index 907ecdf..8f543a8 100644 (file)
@@ -240,7 +240,8 @@ MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, msg_task_t task,
 
   /* Try to send it by calling SIMIX network layer */
   TRY {
-      smx_action_t comm = simcall_comm_isend(mailbox, t_simdata->message_size,
+    smx_action_t comm = NULL;
+    comm = simcall_comm_isend(mailbox, t_simdata->message_size,
                                   t_simdata->rate, task, sizeof(void *),
                                   NULL, NULL, task, 0);
 #ifdef HAVE_TRACING
index bcc6ba8..dcacc04 100644 (file)
@@ -760,9 +760,11 @@ void simcall_comm_send(smx_rdv_t rdv, double task_size, double rate,
 
   if (MC_is_active()) {
     /* the model-checker wants two separate simcalls */
-    smx_action_t comm = simcall_comm_isend(rdv, task_size, rate,
+    smx_action_t comm = NULL;
+    comm = simcall_comm_isend(rdv, task_size, rate,
         src_buff, src_buff_size, match_fun, NULL, data, 0);
     simcall_comm_wait(comm, timeout);
+    comm = NULL;
   }
   else {
     simcall_BODY_comm_send(rdv, task_size, rate, src_buff, src_buff_size,
@@ -801,9 +803,11 @@ void simcall_comm_recv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
 
   if (MC_is_active()) {
     /* the model-checker wants two separate simcalls */
-    smx_action_t comm = simcall_comm_irecv(rdv, dst_buff, dst_buff_size,
+    smx_action_t comm = NULL;
+    comm = simcall_comm_irecv(rdv, dst_buff, dst_buff_size,
         match_fun, data);
     simcall_comm_wait(comm, timeout);
+    comm = NULL;
   }
   else {
     simcall_BODY_comm_recv(rdv, dst_buff, dst_buff_size,