Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Fix MC with the class-hierarchification of simgrid::simix::Synchro
[simgrid.git] / src / mc / mc_comm_pattern.cpp
index 1241a60..0b2549e 100644 (file)
@@ -87,13 +87,17 @@ void MC_handle_comm_pattern(
   case MC_CALL_TYPE_WAIT:
   case MC_CALL_TYPE_WAITANY:
     {
-      smx_synchro_t comm_addr = nullptr;
+      simgrid::mc::RemotePtr<simgrid::simix::Comm> comm_addr = nullptr;
       if (call_type == MC_CALL_TYPE_WAIT)
-        comm_addr = simcall_comm_wait__get__comm(req);
-      else
+        comm_addr = remote(static_cast<simgrid::simix::Comm*>(
+          simcall_comm_wait__get__comm(req)));
+      else {
+        simgrid::simix::Comm* addr;
         // comm_addr = REMOTE(xbt_dynar_get_as(simcall_comm_waitany__get__comms(req), value, smx_synchro_t)):
-        simgrid::mc::read_element(mc_model_checker->process(), &comm_addr,
+        simgrid::mc::read_element(mc_model_checker->process(), &addr,
           remote(simcall_comm_waitany__get__comms(req)), value, sizeof(comm_addr));
+        comm_addr = remote(addr);
+      }
       checker->complete_comm_pattern(pattern, comm_addr,
         MC_smx_simcall_get_issuer(req)->pid, backtracking);
     }