[asan] get rid of some of the uses of kPageSize. The intent is to get rid of it completely to support platforms with multiple possible page sizes.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168517 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc
index a70adee..2f89a1e 100644
--- a/lib/asan/asan_linux.cc
+++ b/lib/asan/asan_linux.cc
@@ -176,9 +176,10 @@
uptr sp = (uptr)ucp->uc_stack.ss_sp;
uptr size = ucp->uc_stack.ss_size;
// Align to page size.
- uptr bottom = sp & ~(kPageSize - 1);
+ uptr PageSize = GetPageSizeCached();
+ uptr bottom = sp & ~(PageSize - 1);
size += sp - bottom;
- size = RoundUpTo(size, kPageSize);
+ size = RoundUpTo(size, PageSize);
PoisonShadow(bottom, size, 0);
}
#else