A recent Solaris 11.5 Beta build (st_047) introduced MADV_DONTDUMP,
breaking the libsanitizer build.  The fix is already upstream

        https://reviews.llvm.org/D62892

and I've now installed it on mainline and the gcc-9 branch after testing
on i386-pc-solaris2.11 and sparc-sun-solaris2.11.

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2019-06-26  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

        * sanitizer_common/sanitizer_posix_libcdep.cc: Cherry-pick
        compiler-rt revision 363778.

# HG changeset patch
# Parent  c1cbe0c8b63f80662191072c1b6dbd599e42af53
Fix sanitizer_common/sanitizer_posix_libcdep.cc compilation on Solaris 11.5

diff --git a/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc
--- a/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc
+++ b/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc
@@ -69,7 +69,7 @@ void ReleaseMemoryPagesToOS(uptr beg, up
 
 bool NoHugePagesInRegion(uptr addr, uptr size) {
 #ifdef MADV_NOHUGEPAGE  // May not be defined on old systems.
-  return madvise((void *)addr, size, MADV_NOHUGEPAGE) == 0;
+  return madvise((char *)addr, size, MADV_NOHUGEPAGE) == 0;
 #else
   return true;
 #endif  // MADV_NOHUGEPAGE
@@ -77,9 +77,9 @@ bool NoHugePagesInRegion(uptr addr, uptr
 
 bool DontDumpShadowMemory(uptr addr, uptr length) {
 #if defined(MADV_DONTDUMP)
-  return madvise((void *)addr, length, MADV_DONTDUMP) == 0;
+  return madvise((char *)addr, length, MADV_DONTDUMP) == 0;
 #elif defined(MADV_NOCORE)
-  return madvise((void *)addr, length, MADV_NOCORE) == 0;
+  return madvise((char *)addr, length, MADV_NOCORE) == 0;
 #else
   return true;
 #endif  // MADV_DONTDUMP

Reply via email to