[compiler-rt] 3581616 - tsan: pass thr/pc to MemoryResetRange

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 5 07:57:07 PDT 2021


Author: Dmitry Vyukov
Date: 2021-08-05T16:57:02+02:00
New Revision: 35816163f26b14122895ce0d0ea3b44e9d23ff3f

URL: https://github.com/llvm/llvm-project/commit/35816163f26b14122895ce0d0ea3b44e9d23ff3f
DIFF: https://github.com/llvm/llvm-project/commit/35816163f26b14122895ce0d0ea3b44e9d23ff3f.diff

LOG: tsan: pass thr/pc to MemoryResetRange

Pass thr/pc args to MemoryResetRange as we do everywhere.
Currently they are unused by MemoryResetRange,
but there is no reason to be inconsistent.

Depends on D107562.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D107563

Added: 
    

Modified: 
    compiler-rt/lib/tsan/go/tsan_go.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/tsan/go/tsan_go.cpp b/compiler-rt/lib/tsan/go/tsan_go.cpp
index fa8ad16bcd92..104c5b325aee 100644
--- a/compiler-rt/lib/tsan/go/tsan_go.cpp
+++ b/compiler-rt/lib/tsan/go/tsan_go.cpp
@@ -210,7 +210,7 @@ void __tsan_malloc(ThreadState *thr, uptr pc, uptr p, uptr sz) {
   CHECK(inited);
   if (thr && pc)
     ctx->metamap.AllocBlock(thr, pc, p, sz);
-  MemoryResetRange(0, 0, (uptr)p, sz);
+  MemoryResetRange(thr, pc, (uptr)p, sz);
 }
 
 void __tsan_free(uptr p, uptr sz) {


        


More information about the llvm-commits mailing list