[compiler-rt] [RISCV][sanitizer] Fix sanitizer support for different virtual memory layout (PR #66743)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 19 12:03:33 PDT 2023


================
@@ -284,7 +284,7 @@
 // For such platforms build this code with -DSANITIZER_CAN_USE_ALLOCATOR64=0 or
 // change the definition of SANITIZER_CAN_USE_ALLOCATOR64 here.
 #ifndef SANITIZER_CAN_USE_ALLOCATOR64
-#  if SANITIZER_RISCV64 || SANITIZER_IOS || SANITIZER_DRIVERKIT
+#  if SANITIZER_IOS || SANITIZER_DRIVERKIT
----------------
PiJoules wrote:

If you land this, could you make this line
```
# if SANITIZER_FUCHSIA || SANITIZER_IOS || SANITIZER_DRIVERKIT
```
or perhaps 
```
# if (SANITIZER_RISCV64 && !SANITIZER_LINUX) || SANITIZER_IOS || SANITIZER_DRIVERKIT
```
if this is meant to be specifically for linux+riscv. Fuchsia has its own custom allocator settings and the various allocator headers have the `#if SANITIZER_FUCHSIA` check before the `#elif SANITIZER_RISCV` check, so we wouldn't want to use the same tunings we have for aarch64/x86_64 for riscv64 without testing them yet.

https://github.com/llvm/llvm-project/pull/66743


More information about the llvm-commits mailing list