summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2016-12-05 14:37:42 +0000
committerDaniel Jasper <djasper@google.com>2016-12-05 14:37:42 +0000
commit01c7498dc7bd7fa713045abd313938fcc9f17642 (patch)
tree481e0e944e14f304c98d34f9349367e7688e435f /lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
parent9fdd37c4b9ce28bb249fab951d7dc581b14db9ab (diff)
Remove a couple of memset usages from TSan, introduced in r288624.
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. Patch by Sam McCall, review: https://reviews.llvm.org/D27407 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@288672 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc')
-rw-r--r--lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc b/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
index c041de346..dce73edc9 100644
--- a/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
+++ b/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
@@ -152,8 +152,10 @@ bool SymbolizerProcess::StartSymbolizerSubprocess() {
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);