From: Martin Quinson Date: Mon, 14 Jan 2019 20:04:58 +0000 (+0100) Subject: make sure that debugging msg don't cause any segfault X-Git-Tag: v3_22~562 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1755679a15d431fa056e086403a475f5d4d345c3?hp=b9964e3f91a54279a938c17a9ddb92d3da9ed99f make sure that debugging msg don't cause any segfault --- diff --git a/src/simix/ActorImpl.cpp b/src/simix/ActorImpl.cpp index a89e3c29b2..73c1c7e9e9 100644 --- a/src/simix/ActorImpl.cpp +++ b/src/simix/ActorImpl.cpp @@ -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;