#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
boost::context::detail::fcontext_t fc_;
typedef boost::context::detail::transfer_t arg_type;
#endif
-#if HAVE_SANITIZER_ADDRESS_FIBER_SUPPORT
- const void* asan_stack_ = nullptr;
- size_t asan_stack_size_ = 0;
- BoostContext* asan_ctx_ = nullptr;
- bool asan_stop_ = false;
-#endif
static void wrapper(arg_type arg);
};
: 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())
/** pointer to top the stack stack */
void* stack_top_ = nullptr;
-#if HAVE_SANITIZER_ADDRESS_FIBER_SUPPORT
- const void* asan_stack_ = nullptr;
- size_t asan_stack_size_ = 0;
- RawContext* asan_ctx_ = nullptr;
- bool asan_stop_ = false;
-#endif
-
static void wrapper(void* arg);
};
this->stack_ = xbt_malloc0(smx_context_stack_size);
}
+#if PTH_STACKGROWTH == -1
+ ASAN_ONLY(this->asan_stack_ = static_cast<char*>(this->stack_) + smx_context_usable_stack_size);
+#else
+ ASAN_ONLY(this->asan_stack_ = this->stack_);
+#endif
#if HAVE_VALGRIND_H
unsigned int valgrind_stack_id =
VALGRIND_STACK_REGISTER(this->stack_, (char*)this->stack_ + smx_context_stack_size);
static thread_local uintptr_t worker_id_;
+#if HAVE_SANITIZER_ADDRESS_FIBER_SUPPORT
+ const void* asan_stack_ = nullptr;
+ size_t asan_stack_size_ = 0;
+ SwappedContext* asan_ctx_ = nullptr;
+ bool asan_stop_ = false;
+#endif
+
private:
void* stack_ = nullptr; /* the thread stack */
SwappedContextFactory* const factory_; // for sequential and parallel run_all()
this->uc_.uc_link = nullptr;
this->uc_.uc_stack.ss_sp = sg_makecontext_stack_addr(get_stack());
this->uc_.uc_stack.ss_size = sg_makecontext_stack_size(smx_context_usable_stack_size);
-#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
// Makecontext expects integer arguments; we want to pass a pointer.
// This context address is decomposed into a serie of integers, which are passed as arguments to makecontext.
private:
ucontext_t uc_; /* the ucontext that executes the code */
-
-#if HAVE_SANITIZER_ADDRESS_FIBER_SUPPORT
- const void* asan_stack_ = nullptr;
- size_t asan_stack_size_ = 0;
- UContext* asan_ctx_ = nullptr;
- bool asan_stop_ = false;
-#endif
};
class UContextFactory : public SwappedContextFactory {