Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MC: do not segfault when the logs are activated
[simgrid.git] / src / simix / libsmx.cpp
index d27ddfc..9914b02 100644 (file)
@@ -224,6 +224,11 @@ void simcall_run_blocking(std::function<void()> const& code, simgrid::kernel::ac
 const char* SIMIX_simcall_name(const s_smx_simcall& simcall)
 {
   if (simcall.observer_ != nullptr) {
+#if SIMGRID_HAVE_MC
+    if (mc_model_checker != nullptr) // Do not try to use the observer from the MCer
+      return "(remotely observed)";
+#endif
+
     static std::string name;
     name              = boost::core::demangle(typeid(*simcall.observer_).name());
     const char* cname = name.c_str();