[compiler-rt] [llvm] [RISCV][sanitizer] Fix sanitizer support for different virtual memory layout (PR #66743)
Hau Hsu via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 3 20:57:22 PDT 2024
================
@@ -107,7 +107,7 @@ static const uint64_t kMIPS32_ShadowOffset32 = 0x0aaa0000;
static const uint64_t kMIPS64_ShadowOffset64 = 1ULL << 37;
static const uint64_t kAArch64_ShadowOffset64 = 1ULL << 36;
static const uint64_t kLoongArch64_ShadowOffset64 = 1ULL << 46;
-static const uint64_t kRISCV64_ShadowOffset64 = 0xd55550000;
+static const uint64_t kRISCV64_ShadowOffset64 = kDynamicShadowSentinel;
----------------
hau-hsu wrote:
It defined a little bit above this line:
```
static const uint64_t kDynamicShadowSentinel =
std::numeric_limits<uint64_t>::max();
```
https://github.com/llvm/llvm-project/blob/299ea602abe64813e7ed89b82e75b9679a168a62/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp#L99
https://github.com/llvm/llvm-project/pull/66743
More information about the llvm-commits
mailing list