summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerTracePC.cpp
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/FuzzerTracePC.cpp
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/FuzzerTracePC.cpp')
-rw-r--r--llvm/lib/Fuzzer/FuzzerTracePC.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerTracePC.cpp b/llvm/lib/Fuzzer/FuzzerTracePC.cpp
index 781bd56eb7e..6cb1c66e205 100644
--- a/llvm/lib/Fuzzer/FuzzerTracePC.cpp
+++ b/llvm/lib/Fuzzer/FuzzerTracePC.cpp
@@ -198,9 +198,7 @@ void TracePC::PrintCoverage() {
// For cmp instructions the interesting value is a XOR of the parameters.
// The interesting value is mixed up with the PC and is then added to the map.
-#ifdef __clang__ // avoid gcc warning.
-__attribute__((no_sanitize("memory")))
-#endif
+ATTRIBUTE_NO_SANITIZE_MEMORY
void TracePC::AddValueForMemcmp(void *caller_pc, const void *s1, const void *s2,
size_t n) {
if (!n) return;
@@ -218,9 +216,7 @@ void TracePC::AddValueForMemcmp(void *caller_pc, const void *s1, const void *s2,
TPC.HandleValueProfile((PC & 4095) | (Idx << 12));
}
-#ifdef __clang__ // avoid gcc warning.
-__attribute__((no_sanitize("memory")))
-#endif
+ATTRIBUTE_NO_SANITIZE_MEMORY
void TracePC::AddValueForStrcmp(void *caller_pc, const char *s1, const char *s2,
size_t n) {
if (!n) return;
OpenPOWER on IntegriCloud