Fix sanitizer_common/sanitizer_posix_libcdep.cc compilation on Solaris 11.5

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

From-SVN: r272685
This commit is contained in:
Rainer Orth 2019-06-26 10:43:08 +00:00 committed by Rainer Orth
parent 2bca2d6a72
commit 7cfb726052
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2019-06-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* sanitizer_common/sanitizer_posix_libcdep.cc: Cherry-pick
compiler-rt revision 363778.
2019-06-18 Iain Sandoe <iain@sandoe.co.uk>
PR libsanitizer/87880

View File

@ -69,7 +69,7 @@ void ReleaseMemoryPagesToOS(uptr beg, uptr end) {
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 size) {
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