https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86759

--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
We actually also need

commit 4b8cb24bb7cf820f095b20edaa5812d4b78189a4
Author: Bill Seurer <seu...@linux.vnet.ibm.com>
Date:   Tue Nov 28 16:28:54 2017 +0000

    [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.


    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319180
91177308-0d34-0410-b5e6-96231b3b80d8

diff --git a/lib/tsan/rtl/tsan_platform_linux.cc
b/lib/tsan/rtl/tsan_platform_linux.cc
index 216eef93c..e14d5f575 100644
--- a/lib/tsan/rtl/tsan_platform_linux.cc
+++ b/lib/tsan/rtl/tsan_platform_linux.cc
@@ -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

Reply via email to