// BoostContext
-BoostContext::BoostContext(std::function<void()> code, void_pfn_smxprocess_t cleanup_func, smx_actor_t process,
+BoostContext::BoostContext(std::function<void()> code, void_pfn_smxprocess_t cleanup_func, smx_actor_t actor,
SwappedContextFactory* factory)
- : SwappedContext(std::move(code), cleanup_func, process, factory)
+ : SwappedContext(std::move(code), cleanup_func, actor, factory)
{
/* if the user provided a function for the process then use it, otherwise it is the context for maestro */
#else
void* stack = get_stack();
#endif
- ASAN_ONLY(this->asan_stack_ = stack);
#if BOOST_VERSION < 106100
this->fc_ = boost::context::make_fcontext(stack, smx_context_usable_stack_size, BoostContext::wrapper);
#else
#endif
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();
}