[llvm] r318045 - [PowerPC][msan] Update msan to handle changed memory layouts in newer kernels
    Bill Seurer via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Nov 13 07:43:19 PST 2017
    
    
  
Author: seurer
Date: Mon Nov 13 07:43:19 2017
New Revision: 318045
URL: http://llvm.org/viewvc/llvm-project?rev=318045&view=rev
Log:
[PowerPC][msan] Update msan to handle changed memory layouts in newer kernels
In more recent Linux kernels (including those with 47 bit VMAs) the layout of
virtual memory for powerpc64 changed causing the memory sanitizer to not
work properly. This patch adjusts a bit mask in the memory sanitizer to work
on the newer kernels while continuing to work on the older ones as well.
This is the non-runtime part of the patch and finishes it. ref: r317802
Tested on several 4.x and 3.x kernel releases.
Modified:
    llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp
Modified: llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp?rev=318045&r1=318044&r2=318045&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp Mon Nov 13 07:43:19 2017
@@ -290,7 +290,7 @@ static const MemoryMapParams Linux_MIPS6
 
 // ppc64 Linux
 static const MemoryMapParams Linux_PowerPC64_MemoryMapParams = {
-  0x200000000000,  // AndMask
+  0xE00000000000,  // AndMask
   0x100000000000,  // XorMask
   0x080000000000,  // ShadowBase
   0x1C0000000000,  // OriginBase
    
    
More information about the llvm-commits
mailing list