From 80a26f28c70233093bcb877e7a3e38b5cdca6091 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 28 Dec 2017 18:38:36 +0100 Subject: [PATCH 1/1] Shutdown Engine first, and fix double-free errors. --- src/surf/surf_interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ } -- 2.20.1