llvm.org GIT mirror llvm / de65922
[lib/Fuzzer] remove the -dfsan=1 flag, just use -use_traces=1 (w/ or w/o dfsan) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237083 91177308-0d34-0410-b5e6-96231b3b80d8 Kostya Serebryany 5 years ago
5 changed file(s) with 4 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
215215 Options.UseTraces = Flags.use_traces;
216216 Options.UseFullCoverageSet = Flags.use_full_coverage_set;
217217 Options.UseCoveragePairs = Flags.use_coverage_pairs;
218 Options.UseDFSan = Flags.dfsan;
219218 Options.PreferSmallDuringInitialShuffle =
220219 Flags.prefer_small_during_initial_shuffle;
221220 Options.Tokens = ReadTokensFile(Flags.tokens);
4444 " with stdout/stderr redirected to fuzz-JOB.log.")
4545 FUZZER_FLAG_INT(workers, 0,
4646 "Number of simultaneous worker processes to run the jobs.")
47 FUZZER_FLAG_INT(dfsan, 1, "Use DFSan for taint-guided mutations. No-op unless "
48 "the DFSan instrumentation was compiled in.")
4947 FUZZER_FLAG_INT(reload, 1,
5048 "Reload the main corpus periodically to get new units"
5149 "discovered by other processes.")
5555 bool UseTraces = false;
5656 bool UseFullCoverageSet = false;
5757 bool UseCoveragePairs = false;
58 bool UseDFSan = false;
5958 bool Reload = true;
6059 int PreferSmallDuringInitialShuffle = -1;
6160 size_t MaxNumberOfRuns = ULONG_MAX;
324324 }
325325
326326 void Fuzzer::InitializeTraceState() {
327 if (!Options.UseTraces && !Options.UseDFSan) return;
327 if (!Options.UseTraces) return;
328328 TS = new TraceState(Options, CurrentUnit);
329329 CurrentUnit.resize(Options.MaxLen);
330330 // The rest really requires DFSan.
331 if (!ReallyHaveDFSan() || !Options.UseDFSan) return;
331 if (!ReallyHaveDFSan()) return;
332332 for (size_t i = 0; i < static_cast(Options.MaxLen); i++) {
333333 dfsan_label L = dfsan_create_label("input", (void*)(i + 1));
334334 // We assume that no one else has called dfsan_create_label before.
1818
1919 RUN: not ./LLVMFuzzer-CounterTest -use_counters=1 -max_len=6 -seed=1 -timeout=15 2>&1 | FileCheck %s
2020
21 RUN: not ./LLVMFuzzer-DFSanSimpleCmpTest-DFSan -seed=1 -runs=1000000 -timeout=5 2>&1 | FileCheck %s
21 RUN: not ./LLVMFuzzer-DFSanSimpleCmpTest-DFSan -use_traces=1 -seed=1 -runs=1000000 -timeout=5 2>&1 | FileCheck %s
2222 RUN: not ./LLVMFuzzer-DFSanSimpleCmpTest -use_traces=1 -seed=1 -runs=1000000 -timeout=5 2>&1 | FileCheck %s
2323
24 RUN: not ./LLVMFuzzer-DFSanMemcmpTest-DFSan -seed=1 -runs=100 -timeout=5 2>&1 | FileCheck %s
24 RUN: not ./LLVMFuzzer-DFSanMemcmpTest-DFSan -use_traces=1 -seed=1 -runs=100 -timeout=5 2>&1 | FileCheck %s
2525
2626 RUN: not ./LLVMFuzzer-CxxTokensTest -seed=1 -timeout=15 -tokens=%S/../cxx_fuzzer_tokens.txt 2>&1 | FileCheck %s
2727