Lines Matching +full:html +full:- +full:export

1 /*===- DataFlow.cpp - a standalone DataFlow tracer                  -------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
8 // An experimental data-flow tracer for fuzz targets.
10 // https://clang.llvm.org/docs/DataFlowSanitizer.html
11 // https://clang.llvm.org/docs/SanitizerCoverage.html#tracing-data-flow
17 // and also provides basic-block coverage for every input.
20 // 1. Compile this file (DataFlow.cpp) with -fsanitize=dataflow and -O2.
21 // 2. Compile DataFlowCallbacks.cpp with -O2 -fPIC.
22 // 3. Build the fuzz target with -g -fsanitize=dataflow
23 // -fsanitize-coverage=trace-pc-guard,pc-table,bb,trace-cmp
24 // 4. Link those together with -fsanitize=dataflow
26 // -fsanitize-coverage=trace-cmp inserts callbacks around every comparison
31 // -fsanitize-coverage=trace-pc-guard,pc-table,bb instruments function
33 // -fsanitize-coverage=...,bb also allows to collect basic block coverage.
39 // export DFSAN_OPTIONS=warn_unimplemented=0
42 // # Print all instrumented functions. llvm-symbolizer must be present in PATH
57 //===----------------------------------------------------------------------===*/
88 // So use backtrace_symbols_fd and pipe it through llvm-symbolizer. in PrintFunctions()
90 // We'll need to make a proper in-process symbolizer work with DFSan. in PrintFunctions()
92 "| llvm-symbolizer " in PrintFunctions()
130 Iter == NumIterations - 1 ? LenOfLastIteration : kNumLabels); in PrintDataFlow()
136 ssize_t CurrentFuncGuard = -1; in PrintCoverage()
137 ssize_t CurrentFuncNum = -1; in PrintCoverage()
138 ssize_t NumBlocksInCurrentFunc = -1; in PrintCoverage()
149 fprintf(Out, " %zd", I - FuncBeg); in PrintCoverage()
150 fprintf(Out, " %zd\n", FuncEnd - FuncBeg); in PrintCoverage()
175 NumIterations = (NumBytesRead + kNumLabels - 1) / kNumLabels; in main()
193 dfsan_set_label(1 << (Idx - BaseIdx), Buf + Idx, 1); in main()