[PATCH] D56107: [sanitizer] Avoid memset call in tsan
Jordan Rupprecht via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 27 12:32:45 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL350098: [sanitizer] Avoid memset call in tsan (authored by rupprecht, committed by ).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56107/new/
https://reviews.llvm.org/D56107
Files:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc
@@ -322,7 +322,8 @@
CHECK_GE(fd, 0);
if (fd > 2)
return fd;
- bool used[3] = {false, false, false};
+ bool used[3];
+ internal_memset(used, 0, sizeof(used));
while (fd <= 2) {
used[fd] = true;
fd = internal_dup(fd);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56107.179572.patch
Type: text/x-patch
Size: 500 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181227/556f654c/attachment.bin>
More information about the llvm-commits
mailing list