[compiler-rt] [TSan] Make Shadow/Meta region inclusive-exclusive (PR #144647)

Marco Elver via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 18 00:33:50 PDT 2025


================
@@ -675,7 +675,7 @@ void MemoryAccessRangeT(ThreadState* thr, uptr pc, uptr addr, uptr size) {
     Printf("Access to non app mem start: %p\n", (void*)addr);
     DCHECK(IsAppMem(addr));
   }
-  if (!IsAppMem(addr + size - 1)) {
+  if (size > 0 && !IsAppMem(addr + size - 1)) {
----------------
melver wrote:

This is called from MemoryAccessRange, which checks if size==0, and since size is uptr size will always be > 0. Therefore this check is pointless.

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


More information about the llvm-commits mailing list