Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Factorize some of the ASAN_ONLY code.
[simgrid.git] / src / kernel / context / ContextSwapped.hpp
index 60d9987..aba97d5 100644 (file)
@@ -18,7 +18,7 @@ class SwappedContext;
 class SwappedContextFactory : public ContextFactory {
   friend SwappedContext; // Reads whether we are in parallel mode
 public:
-  explicit SwappedContextFactory(std::string name);
+  SwappedContextFactory();
   ~SwappedContextFactory() override;
   void run_all() override;
 
@@ -47,9 +47,15 @@ public:
 
   void* get_stack();
 
-  // FIXME: Killme
   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()