diff --git a/compiler-rt/lib/scudo/standalone/linux.cpp b/compiler-rt/lib/scudo/standalone/linux.cpp index 9b5ed67c515d..63a8e43b5bfb 100644 --- a/compiler-rt/lib/scudo/standalone/linux.cpp +++ b/compiler-rt/lib/scudo/standalone/linux.cpp @@ -96,7 +96,7 @@ static bool madviseNeedsMemset() { MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (!P) dieOnMapUnmapError(errno == ENOMEM); - *P = -1; + *P = 1; while (madvise(P, Size, MADV_DONTNEED) == -1 && errno == EAGAIN) { } bool R = (*P != 0);