From 54f07f038966ffe0b3e8ef526e9192f7eb49ad09 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Tue, 3 Apr 2018 13:40:22 +0200 Subject: [PATCH] fix some issues arising when killing new-born actors (see #260) --- src/kernel/activity/ExecImpl.cpp | 2 +- src/simix/ActorImpl.hpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/kernel/activity/ExecImpl.cpp b/src/kernel/activity/ExecImpl.cpp index 521785dcc1..e7b79f0528 100644 --- a/src/kernel/activity/ExecImpl.cpp +++ b/src/kernel/activity/ExecImpl.cpp @@ -75,7 +75,7 @@ void simgrid::kernel::activity::ExecImpl::post() /* If the host running the synchro failed, notice it. This way, the asking * process can be killed if it runs on that host itself */ state = SIMIX_FAILED; - } else if (surfAction_->get_state() == simgrid::kernel::resource::Action::State::failed) { + } else if (surfAction_ && surfAction_->get_state() == simgrid::kernel::resource::Action::State::failed) { /* If the host running the synchro didn't fail, then the synchro was canceled */ state = SIMIX_CANCELED; } else if (timeoutDetector && timeoutDetector->get_state() == simgrid::kernel::resource::Action::State::done) { diff --git a/src/simix/ActorImpl.hpp b/src/simix/ActorImpl.hpp index 9fe8d89d9d..7fb9ab50f2 100644 --- a/src/simix/ActorImpl.hpp +++ b/src/simix/ActorImpl.hpp @@ -62,7 +62,6 @@ public: s4u::Host* host = nullptr; /* the host on which the process is running */ smx_context_t context = nullptr; /* the context (uctx/raw/thread) that executes the user function */ - // TODO, pack them std::exception_ptr exception; bool finished = false; bool blocked = false; -- 2.20.1