From: Martin Quinson Date: Mon, 13 Aug 2018 09:08:06 +0000 (+0200) Subject: on actor_restart, add it into the real map, not into a copy of it X-Git-Tag: v3_21~256 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/bf94b6b7a4b3d8cd1a7c252cfc6d237bac7f5e44 on actor_restart, add it into the real map, not into a copy of it This does not fix it, but uncovers the next failure :( --- diff --git a/src/s4u/s4u_Actor.cpp b/src/s4u/s4u_Actor.cpp index b933c632c4..18c9bba74b 100644 --- a/src/s4u/s4u_Actor.cpp +++ b/src/s4u/s4u_Actor.cpp @@ -78,11 +78,11 @@ void Actor::set_auto_restart(bool autorestart) simgrid::simix::simcall([this, autorestart]() { pimpl_->set_auto_restart(autorestart); - std::map actors_map = pimpl_->host_->pimpl_->actors_at_boot_; - if (actors_map.find(pimpl_->name_) == actors_map.end()) { + std::map* actors_map = &pimpl_->host_->pimpl_->actors_at_boot_; + if (actors_map->find(pimpl_->name_) == actors_map->end()) { simgrid::kernel::actor::ProcessArg* arg = new simgrid::kernel::actor::ProcessArg(pimpl_->host_, pimpl_); XBT_DEBUG("Adding Process %s to the actors_at_boot_ list of Host %s", arg->name.c_str(), arg->host->get_cname()); - actors_map.insert({arg->name, arg}); + actors_map->insert({arg->name, arg}); } }); }