Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MC: do not segfault when the logs are activated
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 5 Feb 2022 12:18:30 +0000 (13:18 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 5 Feb 2022 13:41:41 +0000 (14:41 +0100)
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();