[PATCH] D27407: Remove a couple of memset usages from TSan, introduced in r288624.
Sam McCall via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 5 05:28:31 PST 2016
sammccall created this revision.
sammccall added a reviewer: dvyukov.
sammccall added a subscriber: llvm-commits.
Herald added a subscriber: kubabrecka.
TSan runtime shouldn't contain memset, so internal_memset is used instead and
syntax that emits memset is avoided.
This doesn't fail in-tree due to TSan being build with -03, but it fails
when TSan is built with -O0, and is (I think) a true positive.
https://reviews.llvm.org/D27407
Files:
lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
Index: lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
===================================================================
--- lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
+++ lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
@@ -152,8 +152,10 @@
int pid = -1;
- int infd[2] = {};
- int outfd[2] = {};
+ int infd[2];
+ internal_memset(&infd, 0, sizeof(infd));
+ int outfd[2];
+ internal_memset(&outfd, 0, sizeof(outfd));
if (!CreateTwoHighNumberedPipes(infd, outfd)) {
Report("WARNING: Can't create a socket pair to start "
"external symbolizer (errno: %d)\n", errno);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27407.80254.patch
Type: text/x-patch
Size: 636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161205/0600e699/attachment.bin>
More information about the llvm-commits
mailing list