Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make sure that debugging msg don't cause any segfault
[simgrid.git] / src / simix / ActorImpl.cpp
index 9ee9621..73c1c7e 100644 (file)
@@ -23,7 +23,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_process, simix, "Logging specific to SIMIX (process)");
 
-unsigned long simix_process_maxpid = 0;
+static unsigned long simix_process_maxpid = 0;
 
 /**
  * @brief Returns the current agent.
@@ -472,8 +472,8 @@ void SIMIX_process_kill(smx_actor_t actor, smx_actor_t issuer)
     return;
   }
 
-  XBT_DEBUG("Actor '%s'@%s is killing actor '%s'@%s", issuer->get_cname(),
-            (issuer->host_ == nullptr ? "(null)" : issuer->host_->get_cname()), actor->get_cname(),
+  XBT_DEBUG("Actor '%s'@%s is killing actor '%s'@%s", issuer == nullptr ? "(null)" : issuer->get_cname(),
+            (issuer == nullptr || issuer->host_ == nullptr ? "(null)" : issuer->host_->get_cname()), actor->get_cname(),
             actor->host_->get_cname());
 
   actor->context_->iwannadie = true;
@@ -504,7 +504,7 @@ void SIMIX_process_kill(smx_actor_t actor, smx_actor_t issuer)
      */
 
     if (simgrid::kernel::context::factory_initializer == nullptr) // Only Java sets a factory_initializer, for now
-      actor->throw_exception(std::make_exception_ptr(simgrid::kernel::context::Context::StopRequest("Host failed")));
+      actor->throw_exception(std::make_exception_ptr(simgrid::kernel::context::Context::StopRequest("host failed")));
   }
 
   /* destroy the blocking synchro if any */