[compiler-rt] r319180 - [PowerPC][tsan] Update tsan to handle changed memory layouts in newer kernels

Bill Seurer via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 08:28:54 PST 2017


Author: seurer
Date: Tue Nov 28 08:28:54 2017
New Revision: 319180

URL: http://llvm.org/viewvc/llvm-project?rev=319180&view=rev
Log:
[PowerPC][tsan] Update tsan to handle changed memory layouts in newer kernels

In more recent Linux kernels with 47 bit VMAs the layout of virtual memory
for powerpc64 changed causing the thread sanitizer to not work properly. This
patch adds support for 47 bit VMA kernels for powerpc64.

(second part)

Tested on several 4.x and 3.x kernel releases.

Modified:
    compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc

Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc?rev=319180&r1=319179&r2=319180&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc Tue Nov 28 08:28:54 2017
@@ -217,9 +217,9 @@ void InitializePlatformEarly() {
     Die();
   }
 #elif defined(__powerpc64__)
-  if (vmaSize != 44 && vmaSize != 46) {
+  if (vmaSize != 44 && vmaSize != 46 && vmaSize != 47) {
     Printf("FATAL: ThreadSanitizer: unsupported VMA range\n");
-    Printf("FATAL: Found %d - Supported 44 and 46\n", vmaSize);
+    Printf("FATAL: Found %d - Supported 44, 46, and 47\n", vmaSize);
     Die();
   }
 #endif




More information about the llvm-commits mailing list