Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
disable dlopen when under sanitizers
[simgrid.git] / src / smpi / internals / smpi_global.cpp
index 769c009..0c1a3b7 100644 (file)
@@ -388,6 +388,13 @@ static void smpi_init_options(){
     }
 #endif
 
+#if defined(HAVE_SANITIZER)
+    if (smpi_privatize_global_variables == SMPI_PRIVATIZE_DLOPEN) {
+      XBT_INFO("Sanitizers don't like dlopen, switching to mmap privatization instead.");
+      smpi_privatize_global_variables = SMPI_PRIVATIZE_MMAP;
+    }
+#endif
+
     if (smpi_cpu_threshold < 0)
       smpi_cpu_threshold = DBL_MAX;