diff --git a/compiler-rt/lib/fuzzer/FuzzerUtil.h b/compiler-rt/lib/fuzzer/FuzzerUtil.h --- a/compiler-rt/lib/fuzzer/FuzzerUtil.h +++ b/compiler-rt/lib/fuzzer/FuzzerUtil.h @@ -15,6 +15,7 @@ #include "FuzzerBuiltinsMsvc.h" #include "FuzzerCommand.h" #include "FuzzerDefs.h" +#include namespace fuzzer { @@ -94,7 +95,7 @@ return static_cast((sizeof(unsigned long long) * 8) - Clzll(X) - 1); } -inline size_t PageSize() { return 4096; } +inline size_t PageSize() { return getpagesize(); } inline uint8_t *RoundUpByPage(uint8_t *P) { uintptr_t X = reinterpret_cast(P); size_t Mask = PageSize() - 1;