[libFuzzer] avoid build warnings in non-assert build (useful warning in this case)

llvm-svn: 244177
This commit is contained in:
Kostya Serebryany 2015-08-05 23:44:42 +00:00
parent 5365532b99
commit d46369d8b3
1 changed files with 4 additions and 1 deletions

View 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);
}
}
}