[compiler-rt] [tsan][riscv] add Go race detector support for RISC-V sv39 VMA (PR #154701)

Thurston Dang via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 21 11:08:08 PDT 2025


================
@@ -681,6 +681,33 @@ struct MappingGoMips64_47 {
   static const uptr kShadowAdd = 0x200000000000ull;
 };
 
+/* Go on linux/riscv64 (39-bit VMA)
+0000 0000 0000 - 000a 0000 0000: executable and heap (40 GiB)
+000a 0000 0000 - 000c 0000 0000: -
+000c 0000 0000 - 0034 0000 0000: shadow - 160 GiB ( ~ 4 * app)
+0034 0000 0000 - 0035 0000 0000: -
+0035 0000 0000 - 0039 0000 0000: metainfo - 40 GiB ( ~ 1 * app)
+0039 0000 0000 - 0040 0000 0000: -
+*/
+struct MappingGoRiscv64_39 {
+  static const uptr kMetaShadowBeg = 0x003500000000ull;
+  static const uptr kMetaShadowEnd = 0x003900000000ull;
----------------
thurstond wrote:

I think changing it to start at e.g., 0x003**8**00000000 or 0x00**40**00000000 would work.

(To accommodate the bit-wise OR, meta regions are usually 0x[something]0000... or 0x[something]8000...)

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


More information about the llvm-commits mailing list