Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Declare fake_stack only with ASan.
[simgrid.git] / src / kernel / context / ContextRaw.cpp
index 7f006bc..fbaec9b 100644 (file)
@@ -271,7 +271,7 @@ void RawContext::wrapper(void* arg)
 
 inline void RawContext::swap(RawContext* from, RawContext* to)
 {
-  void* fake_stack = nullptr;
+  ASAN_ONLY(void* fake_stack = nullptr);
   ASAN_ONLY(to->asan_ctx_ = from);
   ASAN_START_SWITCH(from->asan_stop_ ? nullptr : &fake_stack, to->asan_stack_, to->asan_stack_size_);
   raw_swapcontext(&from->stack_top_, to->stack_top_);