summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerDefs.h
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2016-12-16 22:45:25 +0000
committerKostya Serebryany <kcc@google.com>2016-12-16 22:45:25 +0000
commit3a4e2dd92fc47098b9b5d6d42756ce59c4a67267 (patch)
tree126e8664a967c70a36ea1485a9e4821581dfbd65 /llvm/lib/Fuzzer/FuzzerDefs.h
parentbe7003f99c778beb4917b0caa19c974b0b5bc6fb (diff)
downloadbcm5719-llvm-3a4e2dd92fc47098b9b5d6d42756ce59c4a67267.tar.gz
bcm5719-llvm-3a4e2dd92fc47098b9b5d6d42756ce59c4a67267.zip
[libFuzzer] avoid msan false positives in more cases
llvm-svn: 289999
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerDefs.h')
-rw-r--r--llvm/lib/Fuzzer/FuzzerDefs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerDefs.h b/llvm/lib/Fuzzer/FuzzerDefs.h
index a699045842b..0f5b8a7cf21 100644
--- a/llvm/lib/Fuzzer/FuzzerDefs.h
+++ b/llvm/lib/Fuzzer/FuzzerDefs.h
@@ -44,6 +44,13 @@
#define ATTRIBUTE_TARGET_POPCNT
#endif
+
+#ifdef __clang__ // avoid gcc warning.
+# define ATTRIBUTE_NO_SANITIZE_MEMORY __attribute__((no_sanitize("memory")))
+#else
+# define ATTRIBUTE_NO_SANITIZE_MEMORY
+#endif
+
namespace fuzzer {
template <class T> T Min(T a, T b) { return a < b ? a : b; }
OpenPOWER on IntegriCloud