summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerTraceState.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2015-08-05 23:44:42 +0000
committerKostya Serebryany <kcc@google.com>2015-08-05 23:44:42 +0000
commitd46369d8b3ac989855f76798d25feac790388870 (patch)
treec008b6e6df505f6f50e3aede8aa58fc82d7de1ae /llvm/lib/Fuzzer/FuzzerTraceState.cpp
parent5365532b995c065527929fa0e12213c913af376e (diff)
downloadbcm5719-llvm-d46369d8b3ac989855f76798d25feac790388870.tar.gz
bcm5719-llvm-d46369d8b3ac989855f76798d25feac790388870.zip
[libFuzzer] avoid build warnings in non-assert build (useful warning in this case)
llvm-svn: 244177
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerTraceState.cpp')
-rw-r--r--llvm/lib/Fuzzer/FuzzerTraceState.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerTraceState.cpp b/llvm/lib/Fuzzer/FuzzerTraceState.cpp
index c6f7c9e5a95..1cf89eb077f 100644
--- a/llvm/lib/Fuzzer/FuzzerTraceState.cpp
+++ b/llvm/lib/Fuzzer/FuzzerTraceState.cpp
@@ -419,7 +419,10 @@ void Fuzzer::InitializeTraceState() {
for (size_t i = 0; i < static_cast<size_t>(Options.MaxLen); i++) {
dfsan_label L = dfsan_create_label("input", (void*)(i + 1));
// We assume that no one else has called dfsan_create_label before.
- assert(L == i + 1);
+ if (L != i + 1) {
+ Printf("DFSan labels are not starting from 1, exiting\n");
+ exit(1);
+ }
}
}
OpenPOWER on IntegriCloud