### 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
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;
#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"
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);
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()
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)
}
}
-}
\ No newline at end of file
+}
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++
...
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
+ ...
+}