summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2013-10-21 18:11:57 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2013-10-21 18:11:57 +0000
commitb745eec4e46f00e162b39600c47435b6ab24690a (patch)
tree5aa4a906f5d2d7c5cfa5ea792b5647ba1afd0876
parent4ed49b5301ab46df4a768f53d377508ca746562e (diff)
downloadbcm5719-llvm-b745eec4e46f00e162b39600c47435b6ab24690a.tar.gz
bcm5719-llvm-b745eec4e46f00e162b39600c47435b6ab24690a.zip
Use internal_memset to initialize this variable.
Otherwise, the compiler may use memset in non-optimized builds, which is forbidden in the nolibc part of the runtime. llvm-svn: 193098
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_linux.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
index a0600799ca2..080945d2ece 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
@@ -218,7 +218,8 @@ uptr GetTid() {
}
u64 NanoTime() {
- kernel_timeval tv = {};
+ kernel_timeval tv;
+ internal_memset(&tv, 0, sizeof(tv));
internal_syscall(__NR_gettimeofday, &tv, 0);
return (u64)tv.tv_sec * 1000*1000*1000 + tv.tv_usec * 1000;
}
OpenPOWER on IntegriCloud