: SwappedContext(std::move(code), cleanup, actor, factory)
{
if (has_code()) {
-#if PTH_STACKGROWTH == -1
- ASAN_ONLY(this->asan_stack_ = static_cast<char*>(get_stack()) + smx_context_usable_stack_size);
-#else
- ASAN_ONLY(this->asan_stack_ = get_stack());
-#endif
this->stack_top_ = raw_makecontext(get_stack(), smx_context_usable_stack_size, RawContext::wrapper, this);
} else {
if (MC_is_active())
ASAN_FINISH_SWITCH(nullptr, &context->asan_ctx_->asan_stack_, &context->asan_ctx_->asan_stack_size_);
try {
(*context)();
+ context->Context::stop();
} catch (StopRequest const&) {
XBT_DEBUG("Caught a StopRequest");
} catch (simgrid::Exception const& e) {
XBT_INFO("Actor killed by an uncatched exception %s", simgrid::xbt::demangle(typeid(e).name()).get());
throw;
}
- context->Context::stop();
-
ASAN_ONLY(context->asan_stop_ = true);
context->suspend();
}