Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : fix number and address of blocks in heap comparison algorithm
[simgrid.git] / src / simix / smx_network.c
index a21f74e..b1f47fc 100644 (file)
@@ -205,9 +205,9 @@ void SIMIX_comm_destroy(smx_action_t action)
             action, action->comm.refcount, (int)action->state);
 
   if (action->comm.refcount <= 0) {
-       xbt_backtrace_display_current();
-    xbt_die("the refcount of comm %p is already 0 before decreasing it. "
-            "That's a bug!", action);
+    xbt_backtrace_display_current();
+    xbt_die("The refcount of comm %p is already 0 before decreasing it. "
+            "That's a bug! If you didn't test and/or wait the same communication twice in your code, then the bug is SimGrid's...", action);
   }
   action->comm.refcount--;
   if (action->comm.refcount > 0)
@@ -858,7 +858,7 @@ void SIMIX_comm_copy_data(smx_action_t comm)
 {
   size_t buff_size = comm->comm.src_buff_size;
   /* If there is no data to be copy then return */
-  if (!comm->comm.src_buff || !comm->comm.dst_buff || comm->comm.copied == 1)
+  if (!comm->comm.src_buff || !comm->comm.dst_buff || comm->comm.copied)
     return;
 
   XBT_DEBUG("Copying comm %p data from %s (%p) -> %s (%p) (%zu bytes)",