- s_xbt_dynar_t comms;
- mc_model_checker->process().read_bytes(
- &comms, sizeof(comms), remote(simcall_comm_waitany__get__comms(req)));
- if (not xbt_dynar_is_empty(&comms)) {
- smx_activity_t remote_sync;
- read_element(mc_model_checker->process(),
- &remote_sync, remote(simcall_comm_waitany__get__comms(req)), value,
- sizeof(remote_sync));
- char* p = pointer_to_string(&*remote_sync);
- args = bprintf("comm=%s (%d of %lu)",
- p, value + 1, xbt_dynar_length(&comms));
+ size_t count = simcall_comm_waitany__get__count(req);
+ if (count > 0) {
+ simgrid::kernel::activity::CommImpl* remote_sync;
+ remote_sync = mc_model_checker->process().read(remote(simcall_comm_waitany__get__comms(req) + value));
+ char* p = pointer_to_string(remote_sync);
+ args = bprintf("comm=%s (%d of %zu)", p, value + 1, count);