X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/94f511befd8ea7dea78746c1f6ae818a778e67e7..c641d112f8a557b61ff14c261931077773f21fbd:/src/kernel/context/ContextRaw.cpp diff --git a/src/kernel/context/ContextRaw.cpp b/src/kernel/context/ContextRaw.cpp index 770a35cfe7..8d320a164c 100644 --- a/src/kernel/context/ContextRaw.cpp +++ b/src/kernel/context/ContextRaw.cpp @@ -206,12 +206,9 @@ RawContext::RawContext(std::function code, void_pfn_smxprocess_t cleanup #endif this->stack_top_ = raw_makecontext(this->stack_, smx_context_usable_stack_size, RawContext::wrapper, this); } else { - if (process != nullptr && get_maestro() == nullptr) - set_maestro(this); - if (MC_is_active()) { - XBT_ATTRIB_UNUSED RawContext* maestro = static_cast(get_maestro()); - MC_ignore_heap(&maestro->stack_top_, sizeof(maestro->stack_top_)); - } + set_maestro(this); // save maestro for run_all() + if (MC_is_active()) + MC_ignore_heap(&stack_top_, sizeof(stack_top_)); } }