- if (has_code()) {
- this->stack_top_ = raw_makecontext(get_stack(), smx_context_stack_size, RawContext::wrapper, this);
- } else {
- if (MC_is_active())
- MC_ignore_heap(&stack_top_, sizeof(stack_top_));
- }
-}
-
-void RawContext::wrapper(RawContext* context)
-{
- ASAN_FINISH_SWITCH(nullptr, &context->asan_ctx_->asan_stack_, &context->asan_ctx_->asan_stack_size_);
- try {
- (*context)();
- context->Context::stop();
- } catch (ForcefulKillException const&) {
- XBT_DEBUG("Caught a ForcefulKillException");
- } catch (simgrid::Exception const& e) {
- XBT_INFO("Actor killed by an uncatched exception %s", simgrid::xbt::demangle(typeid(e).name()).get());
- throw;
+ XBT_VERB("Creating a context of stack %uMb", actor->get_stacksize() / 1024 / 1024);
+ if (has_code()) {
+ this->stack_top_ = raw_makecontext(get_stack(), actor->get_stacksize(), smx_ctx_wrapper, this);
+ } else {
+ if (MC_is_active())
+ MC_ignore_heap(&stack_top_, sizeof stack_top_);