summaryrefslogtreecommitdiff
path: root/lib/fuzzer/scripts
Commit message (Collapse)AuthorAgeFilesLines
* [libFuzzer] remove the data-flow-trace (DFT) python scripts; their ↵Kostya Serebryany2019-05-232-138/+0
| | | | | | functionality is now part of libFuzzer proper; also write functions.txt to the disk only if this file doesn't exist yet git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@361452 91177308-0d34-0410-b5e6-96231b3b80d8
* [libFuzzer] DFT: when dumping coverage, also dump the total number of ↵Kostya Serebryany2019-05-081-0/+17
| | | | | | instrumented blocks in a function; update merge_data_flow.py to merge coverage git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@360272 91177308-0d34-0410-b5e6-96231b3b80d8
* [libFuzzer] extend the data flow tracer to also produce basic block coverage ↵Kostya Serebryany2019-05-081-0/+2
| | | | | | for every input. An extended test coming in a separte change. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@360213 91177308-0d34-0410-b5e6-96231b3b80d8
* [libFuzzer] Fix DataFlow.cpp logic when tracing long inputs.Max Moroz2019-04-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@358311 91177308-0d34-0410-b5e6-96231b3b80d8
* [libFuzzer] Another follow up fix for Data Flow scripts in Py3.Max Moroz2019-04-041-2/+6
| | | | | | | | | | | | | | Reviewers: Dor1s Reviewed By: Dor1s Subscribers: delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D60289 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@357732 91177308-0d34-0410-b5e6-96231b3b80d8
* [libFuzzer] Fix output format in data flow merge script after Py3 change.Max Moroz2019-04-041-1/+1
| | | | | | | | | | | | | | Reviewers: Dor1s Reviewed By: Dor1s Subscribers: delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D60288 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@357730 91177308-0d34-0410-b5e6-96231b3b80d8
* [libFuzzer] Make DataFlow scripts Python3 compatible.Max Moroz2019-04-042-6/+8
| | | | | | | | | | | | | | | | | | | Summary: Python2 will hit end of life soon: https://pythonclock.org/ This change also makes the integration with OSS-Fuzz a bit simpler: https://github.com/google/oss-fuzz/issues/1632 Reviewers: morehouse, kcc Reviewed By: morehouse Subscribers: delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D60282 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@357726 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-193-12/+9
| | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@351636 91177308-0d34-0410-b5e6-96231b3b80d8
* [fuzzer] Python 3 print fixesVitaly Buka2018-06-172-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@334902 91177308-0d34-0410-b5e6-96231b3b80d8
* [fuzzer] Fix collect_data_flow.py for python 3Vitaly Buka2018-06-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@334901 91177308-0d34-0410-b5e6-96231b3b80d8
* [libFuzzer] initial implementation of -data_flow_trace. It parses the data ↵Kostya Serebryany2018-06-061-1/+24
| | | | | | flow trace and prints the summary, but doesn't use the information in any other way yet git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@334058 91177308-0d34-0410-b5e6-96231b3b80d8
* [libFuzzer] add collect_data_flow.py that allows to run the data-flow tracer ↵Kostya Serebryany2018-05-311-0/+56
| | | | | | several times on subsets of inputs bytes, to overcome DFSan out-of-label failures git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@333616 91177308-0d34-0410-b5e6-96231b3b80d8
* [libFuzzer] DataFlow tracer now tags a subset of the input. A separate ↵Kostya Serebryany2018-05-241-0/+36
| | | | | | script merges traces from the subsets git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@333149 91177308-0d34-0410-b5e6-96231b3b80d8
* [LibFuzzer] Unbreak the `trace-malloc-unbalanced.test` when using Python 3.Dan Liew2018-04-201-5/+5
| | | | | | | | | The `unbalanced_allocs.py` script uses Python 2 print statement and `iteritems()`. Running `2to3` over the script fixes these. Differential Revision: https://reviews.llvm.org/D45765 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@330389 91177308-0d34-0410-b5e6-96231b3b80d8
* [fuzzer] Script to detect unbalanced allocation in -trace_malloc outputVitaly Buka2017-11-011-0/+93
| | | | | | | | | | Reviewers: kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39466 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317119 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[fuzzer] Fix threaded stack printing and nested mallocs"Vitaly Buka2017-11-011-93/+0
| | | | | | | | | | | Fails on darwin Revert "[fuzzer] Script to detect unbalanced allocation in -trace_malloc output" Needs previous one. This reverts commit r317034, r317036. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317061 91177308-0d34-0410-b5e6-96231b3b80d8
* [fuzzer] Script to detect unbalanced allocation in -trace_malloc outputVitaly Buka2017-10-311-0/+93
Reviewers: kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39466 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317036 91177308-0d34-0410-b5e6-96231b3b80d8