[compiler-rt] 337a024 - [scudo][NFC] Fix cast warning
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 25 15:50:43 PDT 2021
Author: Vitaly Buka
Date: 2021-04-25T15:47:28-07:00
New Revision: 337a024bba1dcf7d1dddc1a3f2750a9c777bbaa9
URL: https://github.com/llvm/llvm-project/commit/337a024bba1dcf7d1dddc1a3f2750a9c777bbaa9
DIFF: https://github.com/llvm/llvm-project/commit/337a024bba1dcf7d1dddc1a3f2750a9c777bbaa9.diff
LOG: [scudo][NFC] Fix cast warning
Added:
Modified:
compiler-rt/lib/scudo/standalone/linux.cpp
Removed:
################################################################################
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);
More information about the llvm-commits
mailing list