[compiler-rt] r231283 - [sanitizer] Since x32 runs under 64-bit kernel, GetKernelAreaSize should return 0

Kostya Serebryany kcc at google.com
Wed Mar 4 12:32:06 PST 2015


Author: kcc
Date: Wed Mar  4 14:32:06 2015
New Revision: 231283

URL: http://llvm.org/viewvc/llvm-project?rev=231283&view=rev
Log:
[sanitizer] Since x32 runs under 64-bit kernel, GetKernelAreaSize should return 0

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc?rev=231283&r1=231282&r2=231283&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc Wed Mar  4 14:32:06 2015
@@ -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
 





More information about the llvm-commits mailing list