[compiler-rt] r186495 - tsan: fix unitialized read warning under newer gcc (it does not have visibility into asm)
Dmitry Vyukov
dvyukov at google.com
Tue Jul 16 23:56:47 PDT 2013
Author: dvyukov
Date: Wed Jul 17 01:56:47 2013
New Revision: 186495
URL: http://llvm.org/viewvc/llvm-project?rev=186495&view=rev
Log:
tsan: fix unitialized read warning under newer gcc (it does not have visibility into asm)
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=186495&r1=186494&r2=186495&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Wed Jul 17 01:56:47 2013
@@ -215,7 +215,7 @@ uptr GetTid() {
}
u64 NanoTime() {
- kernel_timeval tv;
+ kernel_timeval tv = {};
internal_syscall(__NR_gettimeofday, &tv, 0);
return (u64)tv.tv_sec * 1000*1000*1000 + tv.tv_usec * 1000;
}
More information about the llvm-commits
mailing list