chanyancheung / data-race-test

Automatically exported from code.google.com/p/data-race-test
0 stars 1 forks source link

Wrap __memset_sse2 and __GI_memcpy #62

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We were lucky to see both functions racing :)
http://build.chromium.org/p/chromium.fyi/builders/Linux%20Tests%20(tsan%20ui)(1)
/builds/1585/steps/memory%20test:%20ui_2/logs/stdio
==19639== WARNING: Possible data race during write of size 1 at 0x7404001: {{{
==19639==    T0 (L{}):
==19639==     #0  __memset_sse2 
/build/buildd/eglibc-2.11.1/string/../sysdeps/i386/i686/multiarch/memset-sse2.S:
341
==19639==     #1  VisitedLinkMaster::CreateURLTable(int, bool) 
/usr/include/bits/string3.h:86
==19639==     #2  VisitedLinkMaster::BeginReplaceURLTable(int) 
chrome/browser/visitedlink/visitedlink_master.cc:705
==19639==     #3  VisitedLinkMaster::OnTableRebuildComplete(bool, 
std::vector<unsigned long long, std::allocator<unsigned long long> > const&) 
chrome/browser/visitedlink/visitedlink_master.cc:867
==19639==     #4  VisitedLinkMaster::TableBuilder::OnCompleteMainThread() 
chrome/browser/visitedlink/visitedlink_master.cc:997
==19639==   Concurrent read(s) happened at (OR AFTER) these points:
==19639==    T6 (Chrome_CacheThread) (L{}):
==19639==     #0  __GI_memcpy 
/build/buildd/eglibc-2.11.1/string/../sysdeps/i386/i686/multiarch/../memcpy.S:61
==19639==     #1  _IO_getline_info 
/build/buildd/eglibc-2.11.1/libio/iogetline.c:110
==19639==     #2  _IO_getline /build/buildd/eglibc-2.11.1/libio/iogetline.c:42
==19639==     #3  fgets_unlocked 
/build/buildd/eglibc-2.11.1/libio/iofgets_u.c:56
==19639==     #4  getmntent_r /build/buildd/eglibc-2.11.1/misc/mntent_r.c:134
==19639==     #5  __statvfs_getflags 
/build/buildd/eglibc-2.11.1/io/../sysdeps/unix/sysv/linux/internal_statvfs.c:118
==19639==     #6  __internal_statvfs64 
/build/buildd/eglibc-2.11.1/io/../sysdeps/unix/sysv/linux/internal_statvfs.c:240
==19639==     #7  statvfs64 
/build/buildd/eglibc-2.11.1/io/../sysdeps/unix/sysv/linux/statvfs64.c:68
==19639==     #8  base::SysInfo::AmountOfFreeDiskSpace(FilePath const&) 
base/sys_info_posix.cc:43
==19639==     #9  disk_cache::BackendImpl::AdjustMaxCacheSize(int) 
net/disk_cache/backend_impl.cc:1445
==19639==    Race verifier data: 0x4F490E4,0x4EAEFA7
==19639== }}}

Original issue reported on code.google.com by timurrrr on 16 Feb 2011 at 5:17

GoogleCodeExporter commented 9 years ago
a) We shouldn't wrap memset
b) __GI_memcpy should be wrapped since r3103

Original comment by timurrrr on 21 Feb 2011 at 2:44