diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2015-12-09 18:48:10 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2015-12-09 18:48:10 +0000 |
commit | a52d9c604dd8b57bbf4b11c6100467ffe746e44f (patch) | |
tree | 4279f9f553b8cb21215e4a6d8d9cfd217648133c /lib/sanitizer_common/sanitizer_suppressions.cc | |
parent | e854f4a52e33111e03e6b2da2eb3a08534fd53ed (diff) |
[TSan] Try harder to avoid compiler-generated memset calls.
check_memcpy test added in r254959 fails on some configurations due to
memset() calls inserted by Clang. Try harder to avoid them:
* Explicitly use internal_memset() instead of empty braced-initializer.
* Replace "new T()" with "new T", as the former generates zero-initialization
for structs in C++11.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255136 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_suppressions.cc')
-rw-r--r-- | lib/sanitizer_common/sanitizer_suppressions.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sanitizer_common/sanitizer_suppressions.cc b/lib/sanitizer_common/sanitizer_suppressions.cc index 46d463813..f0f2c9c72 100644 --- a/lib/sanitizer_common/sanitizer_suppressions.cc +++ b/lib/sanitizer_common/sanitizer_suppressions.cc @@ -127,7 +127,7 @@ void SuppressionContext::Parse(const char *str) { Printf("%s: failed to parse suppressions\n", SanitizerToolName); Die(); } - Suppression s = {}; + Suppression s; s.type = suppression_types_[type]; s.templ = (char*)InternalAlloc(end2 - line + 1); internal_memcpy(s.templ, line, end2 - line); |