From: Arnaud Giersch Date: Thu, 28 Dec 2017 17:38:36 +0000 (+0100) Subject: Shutdown Engine first, and fix double-free errors. X-Git-Tag: v3.19~381 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/80a26f28c70233093bcb877e7a3e38b5cdca6091?hp=ec857d06b1d66a6d30f243aa73aac83b751edc83 Shutdown Engine first, and fix double-free errors. --- diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index 5960575934..02dfd42156 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -321,6 +321,7 @@ void surf_exit() { TRACE_end(); /* Just in case it was not called by the upper layer (or there is no upper layer) */ + simgrid::s4u::Engine::shutdown(); sg_link_exit(); for (auto const& e : storage_types) { simgrid::surf::StorageType* stype = e.second; @@ -345,7 +346,6 @@ void surf_exit() tmgr_finalize(); sg_platf_exit(); - simgrid::s4u::Engine::shutdown(); NOW = 0; /* Just in case the user plans to restart the simulation afterward */ }