From ce7a1ba1963052486a1bd74ffc4917bb1cf6c4e5 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sun, 25 Nov 2012 16:05:42 +0000 Subject: [PATCH] tsan: faster memory reset for Go llvm-svn: 168567 --- compiler-rt/lib/tsan/go/tsan_go.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler-rt/lib/tsan/go/tsan_go.cc b/compiler-rt/lib/tsan/go/tsan_go.cc index bb1ac1d..cfbe257 100644 --- a/compiler-rt/lib/tsan/go/tsan_go.cc +++ b/compiler-rt/lib/tsan/go/tsan_go.cc @@ -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--; } -- 2.7.4