summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_suppressions.h
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2015-12-09 18:48:10 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2015-12-09 18:48:10 +0000
commita52d9c604dd8b57bbf4b11c6100467ffe746e44f (patch)
tree4279f9f553b8cb21215e4a6d8d9cfd217648133c /lib/sanitizer_common/sanitizer_suppressions.h
parente854f4a52e33111e03e6b2da2eb3a08534fd53ed (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.h')
-rw-r--r--lib/sanitizer_common/sanitizer_suppressions.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_suppressions.h b/lib/sanitizer_common/sanitizer_suppressions.h
index 03f6c8726..d7506fec8 100644
--- a/lib/sanitizer_common/sanitizer_suppressions.h
+++ b/lib/sanitizer_common/sanitizer_suppressions.h
@@ -20,6 +20,7 @@
namespace __sanitizer {
struct Suppression {
+ Suppression() { internal_memset(this, 0, sizeof(*this)); }
const char *type;
char *templ;
atomic_uint32_t hit_count;