Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix #248: Kill of finished MSG processes leads to segfault
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 29 Nov 2017 15:29:29 +0000 (16:29 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 29 Nov 2017 15:49:04 +0000 (16:49 +0100)
ChangeLog
src/simix/ActorImpl.cpp

index eb74d9a..73d46ef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -32,6 +32,9 @@ SimGrid (3.18) NOT RELEASED YET (target: December 24 2017)
  TRACE
  - Remove viva specific tracing as the tool is no longer maintained
 
  TRACE
  - Remove viva specific tracing as the tool is no longer maintained
 
+ Fixed bugs:
+ - #248: Kill of finished MSG processes leads to segfault
+
 SimGrid (3.17) Released October 8 2017
 
  The Drained Leaks release: (almost) no known leaks despite the tests.
 SimGrid (3.17) Released October 8 2017
 
  The Drained Leaks release: (almost) no known leaks despite the tests.
index ed204c9..29ca5bf 100644 (file)
@@ -464,6 +464,12 @@ void SIMIX_process_runall()
  */
 void SIMIX_process_kill(smx_actor_t process, smx_actor_t issuer) {
 
  */
 void SIMIX_process_kill(smx_actor_t process, smx_actor_t issuer) {
 
+  if (process->finished) {
+    XBT_DEBUG("Ignoring request to kill process %s@%s that is already dead", process->getCname(),
+              process->host->getCname());
+    return;
+  }
+
   XBT_DEBUG("Killing process %s@%s", process->getCname(), process->host->getCname());
 
   process->context->iwannadie = 1;
   XBT_DEBUG("Killing process %s@%s", process->getCname(), process->host->getCname());
 
   process->context->iwannadie = 1;