[libFuzzer] avoid build warnings in non-assert build (useful warning in this case)
authorKostya Serebryany <kcc@google.com>
Wed, 5 Aug 2015 23:44:42 +0000 (23:44 +0000)
committerKostya Serebryany <kcc@google.com>
Wed, 5 Aug 2015 23:44:42 +0000 (23:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244177 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Fuzzer/FuzzerTraceState.cpp

index c6f7c9e5a952dda858e6604f6a63a2b4b9a59f60..1cf89eb077f60289088f0084c5474bbd532c2708 100644 (file)
@@ -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);
+    }
   }
 }