tsan: faster memory reset for Go
authorDmitry Vyukov <dvyukov@google.com>
Sun, 25 Nov 2012 16:05:42 +0000 (16:05 +0000)
committerDmitry Vyukov <dvyukov@google.com>
Sun, 25 Nov 2012 16:05:42 +0000 (16:05 +0000)
llvm-svn: 168567

compiler-rt/lib/tsan/go/tsan_go.cc

index bb1ac1d..cfbe257 100644 (file)
@@ -149,8 +149,7 @@ void __tsan_malloc(int goid, void *p, uptr sz, void *pc) {
   if (thr == 0)  // probably before __tsan_init()
     return;
   thr->in_rtl++;
-  MemoryResetRange(thr, (uptr)pc, (uptr)p, sz);
-  MemoryAccessRange(thr, (uptr)pc, (uptr)p, sz, true);
+  MemoryRangeImitateWrite(thr, (uptr)pc, (uptr)p, sz);
   thr->in_rtl--;
 }