Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 1 Nov 2016 18:27:12 +0000 (19:27 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 1 Nov 2016 18:27:12 +0000 (19:27 +0100)
CMakeLists.txt
src/mc/Process.cpp
src/mc/RegionSnapshot.cpp
src/mc/mc_unw.cpp
src/mc/mc_unw_vmread.cpp
tools/cmake/GCCFlags.cmake
tools/simgrid.supp

index d16dc1b..72f539a 100644 (file)
@@ -121,7 +121,7 @@ string(REGEX MATCH "[0-9].[0-9]*" LINKER_VERSION "${LINKER_VERSION}")
 
 ### Set the library providing dlopen
 if("${CMAKE_SYSTEM}" MATCHES "Linux")
-  find_library(dl DL_LIBRARY)
+  find_library(DL_LIBRARY dl)
 endif("${CMAKE_SYSTEM}" MATCHES "Linux")
 
 ### Find programs and paths
index d84e04a..61dc6af 100644 (file)
@@ -649,7 +649,7 @@ std::vector<simgrid::mc::SimixProcessInformation>& Process::old_simix_processes(
 
 void Process::dumpStack()
 {
-  unw_addr_space_t as = unw_create_addr_space(&_UPT_accessors, __BYTE_ORDER);
+  unw_addr_space_t as = unw_create_addr_space(&_UPT_accessors, BYTE_ORDER);
   if (as == nullptr) {
     XBT_ERROR("Could not initialize ptrace address space");
     return;
index 7acb69d..7884740 100644 (file)
@@ -7,6 +7,9 @@
 #include <cstdlib>
 
 #include <sys/mman.h>
+#ifdef __FreeBSD__
+# define MAP_POPULATE MAP_PREFAULT_READ
+#endif
 
 #include "mc/mc.h"
 #include "src/mc/mc_snapshot.h"
@@ -90,10 +93,12 @@ RegionSnapshot dense_region(
     remote(permanent_addr),
     simgrid::mc::ProcessIndexDisabled);
 
+#ifdef __linux__
   if (_sg_mc_ksm)
     // Mark the region as mergeable *after* we have written into it.
     // Trying to merge them before is useless/counterproductive.
     madvise(data.get(), size, MADV_MERGEABLE);
+#endif
 
   simgrid::mc::RegionSnapshot region(
     region_type, start_addr, permanent_addr, size);
index 1a6fa90..5b620dc 100644 (file)
@@ -201,7 +201,7 @@ unw_accessors_t UnwindContext::accessors = {
 
 unw_addr_space_t UnwindContext::createUnwindAddressSpace()
 {
-  return unw_create_addr_space(&UnwindContext::accessors, __BYTE_ORDER);
+  return unw_create_addr_space(&UnwindContext::accessors, BYTE_ORDER);
 }
 
 void UnwindContext::clear()
index 7082dd3..8d5f249 100644 (file)
@@ -129,7 +129,7 @@ static unw_accessors_t accessors = {
 
 unw_addr_space_t create_addr_space()
 {
-  return unw_create_addr_space(&accessors, __BYTE_ORDER);
+  return unw_create_addr_space(&accessors, BYTE_ORDER);
 }
 
 void* create_context(unw_addr_space_t as, pid_t pid)
@@ -138,4 +138,4 @@ void* create_context(unw_addr_space_t as, pid_t pid)
 }
 
 }
-}
\ No newline at end of file
+}
index ab8156f..e7f109f 100644 (file)
@@ -23,8 +23,10 @@ if(enable_compile_warnings)
   if(CMAKE_COMPILER_IS_GNUCXX)
     set(warnCXXFLAGS "${warnCXXFLAGS} -Wclobbered -Wno-error=clobbered  -Wno-unused-local-typedefs -Wno-error=attributes")
   endif()
-  if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") # don't care about class that become struct
-    set(warnCXXFLAGS "${warnCXXFLAGS} -Wno-mismatched-tags")
+  if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+    # don't care about class that become struct, avoid issue of empty C structs
+    # size (coming from libunwind.h)
+    set(warnCXXFLAGS "${warnCXXFLAGS} -Wno-mismatched-tags -Wno-extern-c-compat")
   endif()
 
   # the one specific to C but refused by C++
index ce06e6b..04ac719 100644 (file)
    ...
    fun:luaD_precall
 }
+
+# libunwind seems to be using msync poorly, thus triggering these
+# https://github.com/JuliaLang/julia/issues/4533
+{
+   msync unwind
+   Memcheck:Param
+   msync(start)
+   ...
+   obj:*/libpthread*.so
+   ...
+}