summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2015-03-04 20:32:06 +0000
committerKostya Serebryany <kcc@google.com>2015-03-04 20:32:06 +0000
commit46e5d5c6690e014335993c83efcc9e30c2003033 (patch)
tree4bd2bd91d8d5b4afa9a84ed581c965335df3dcc2
parenteb6c31f900713bfd841f8bea5c0c7d2834ecf4c7 (diff)
downloadbcm5719-llvm-46e5d5c6690e014335993c83efcc9e30c2003033.tar.gz
bcm5719-llvm-46e5d5c6690e014335993c83efcc9e30c2003033.zip
[sanitizer] Since x32 runs under 64-bit kernel, GetKernelAreaSize should return 0
llvm-svn: 231283
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_posix.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc b/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc
index 21826e96c38..72332280b48 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc
@@ -48,7 +48,7 @@ uptr GetMmapGranularity() {
#if SANITIZER_WORDSIZE == 32
// Take care of unusable kernel area in top gigabyte.
static uptr GetKernelAreaSize() {
-#if SANITIZER_LINUX
+#if SANITIZER_LINUX && !SANITIZER_X32
const uptr gbyte = 1UL << 30;
// Firstly check if there are writable segments
@@ -80,7 +80,7 @@ static uptr GetKernelAreaSize() {
return gbyte;
#else
return 0;
-#endif // SANITIZER_LINUX
+#endif // SANITIZER_LINUX && !SANITIZER_X32
}
#endif // SANITIZER_WORDSIZE == 32
OpenPOWER on IntegriCloud