linux-user: Update TASK_UNMAPPED_BASE for aarch64
authorLirong Yuan <yuanzi@google.com>
Fri, 13 Mar 2020 00:28:13 +0000 (17:28 -0700)
committerLaurent Vivier <laurent@vivier.eu>
Fri, 20 Mar 2020 14:51:54 +0000 (15:51 +0100)
This change updates TASK_UNMAPPED_BASE (the base address for guest programs) for aarch64. It is needed to allow qemu to work with Thread Sanitizer (TSan), which has specific boundary definitions for memory mappings on different platforms:
https://github.com/llvm/llvm-project/blob/master/compiler-rt/lib/tsan/rtl/tsan_platform.h

Signed-off-by: Lirong Yuan <yuanzi@google.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200313002813.3857-1-yuanzi@google.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/mmap.c

index 8685f02e7e90d6f9bd0c32fc40c9622e1e7c1df2..e37803379747cfdfc905e6a922039cfb72fce9b2 100644 (file)
@@ -184,7 +184,11 @@ static int mmap_frag(abi_ulong real_start,
 }
 
 #if HOST_LONG_BITS == 64 && TARGET_ABI_BITS == 64
+#ifdef TARGET_AARCH64
+# define TASK_UNMAPPED_BASE  0x5500000000
+#else
 # define TASK_UNMAPPED_BASE  (1ul << 38)
+#endif
 #else
 # define TASK_UNMAPPED_BASE  0x40000000
 #endif