summaryrefslogtreecommitdiff
path: root/compiler-rt/lib/fuzzer/dataflow/DataFlow.cpp
AgeCommit message (Collapse)Author
2021-06-19[libfuzzer] Disable failing DFSan-related testsGeorge Balatsouras
These have been broken by https://reviews.llvm.org/D104494. However, `lib/fuzzer/dataflow/` is unused (?) so addressing this is not a priority. Added TODOs to re-enable them in the future. Reviewed By: stephan.yichao.zhao Differential Revision: https://reviews.llvm.org/D104568
2021-06-07[dfsan] Add full fast8 supportGeorge Balatsouras
Complete support for fast8: - amend shadow size and mapping in runtime - remove fast16 mode and -dfsan-fast-16-labels flag - remove legacy mode and make fast8 mode the default - remove dfsan-fast-8-labels flag - remove functions in dfsan interface only applicable to legacy - remove legacy-related instrumentation code and tests - update documentation. Reviewed By: stephan.yichao.zhao, browneee Differential Revision: https://reviews.llvm.org/D103745
2020-07-29[DFSan] Add efficient fast16labels instrumentation mode.Matt Morehouse
Adds the -fast-16-labels flag, which enables efficient instrumentation for DFSan when the user needs <=16 labels. The instrumentation eliminates most branches and most calls to __dfsan_union or __dfsan_union_load. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D84371
2019-06-21[libFuzzer] split DataFlow.cpp into two .cpp files, one of which can be ↵Kostya Serebryany
compiled w/o dfsan to speed things up (~25% speedup) llvm-svn: 364002
2019-06-20[libFuzzer] ensure that DFT and autofocus works for C++ (mangled) functionsKostya Serebryany
llvm-svn: 363905
2019-06-14[libFuzzer] simplify the DFT trace collection using the new faster DFSan ↵Kostya Serebryany
mode that traces up to 16 labels at a time and never runs out of labels. Second attempt. This time with a fix for windows (putenv instead of setenv)) llvm-svn: 363445
2019-06-14Revert r363326 "[libFuzzer] simplify the DFT trace collection using the new ↵Hans Wennborg
faster DFSan mode that traces up to 16 labels at a time and never runs out of labels." It broke the Windows build: C:\b\s\w\ir\cache\builder\src\third_party\llvm\compiler-rt\lib\fuzzer\FuzzerDataFlowTrace.cpp(243): error C3861: 'setenv': identifier not found This also reverts the follow-up r363327. llvm-svn: 363358
2019-06-13[libFuzzer] simplify the DFT trace collection using the new faster DFSan ↵Kostya Serebryany
mode that traces up to 16 labels at a time and never runs out of labels. llvm-svn: 363326
2019-05-08[libFuzzer] DFT: when dumping coverage, also dump the total number of ↵Kostya Serebryany
instrumented blocks in a function; update merge_data_flow.py to merge coverage llvm-svn: 360272
2019-05-08[libFuzzer] extend the data flow tracer to also produce basic block coverage ↵Kostya Serebryany
for every input. An extended test coming in a separte change. llvm-svn: 360213
2019-04-12[libFuzzer] Fix DataFlow.cpp logic when tracing long inputs.Max Moroz
Summary: 1. Do not create DFSan labels for the bytes which we do not trace. This is where we run out of labels at the first place. 2. When dumping the traces on the disk, make sure to offset the label identifiers by the number of the first byte in the trace range. 3. For the last label, make sure to write it at the last position of the trace bit string, as that label represents the input size, not any particular byte. Also fixed the bug with division in python which I've introduced when migrated the scripts to Python3 (`//` is required for integral division). Otherwise, the scripts are wasting too much time unsuccessfully trying to collect and process traces from the long inputs. For more context, see https://github.com/google/oss-fuzz/issues/1632#issuecomment-481761789 Reviewers: kcc Reviewed By: kcc Subscribers: delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D60538 llvm-svn: 358311
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth
to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
2018-06-06[libFuzzer] initial implementation of -data_flow_trace. It parses the data ↵Kostya Serebryany
flow trace and prints the summary, but doesn't use the information in any other way yet llvm-svn: 334058
2018-05-24[libFuzzer] DataFlow tracer now tags a subset of the input. A separate ↵Kostya Serebryany
script merges traces from the subsets llvm-svn: 333149
2018-05-23[libFuzzer] fix two off-by-ones (!!) in the data flow tracerKostya Serebryany
llvm-svn: 333142
2018-05-23[libFuzzer] change the output format for the DataFlow tracerKostya Serebryany
llvm-svn: 333122
2018-05-10[libFuzzer] Experimental data flow tracer for fuzz targets.Kostya Serebryany
Summary: Experimental data flow tracer for fuzz targets. Allows to tell which bytes of the input affect which functions of the fuzz target. We previously attempted to use DFSan directly in the libFuzzer process, and that didn't work nicely. Now we will try to collect the data flow information for the seed corpus in a separate process (using this tracer), and then use it in the regular libFuzzer runs. Reviewers: morehouse, pcc, Dor1s Reviewed By: morehouse, Dor1s Subscribers: delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D46666 llvm-svn: 332029