Name | Size | Modified | Last Commit | Author |
---|---|---|---|---|
/ contrib / fuzz | ||||
FuzzedDataProvider.h | 12.4 KiB |
r44252:28a91a581fd9 |
|
|
Makefile | 4.5 KiB |
r44296:b7af8a02a304 |
|
|
README.rst | 894 B |
r36716:e437de3881c1 |
|
|
bdiff.cc | 969 B |
r44255:7857bd9bb2b0 |
|
|
dirs.cc | 1.2 KiB |
r44311:8766728dbce6 |
|
|
dirs_corpus.py | 717 B |
r44296:b7af8a02a304 |
|
|
dirstate.cc | 1.0 KiB |
r44311:8766728dbce6 |
|
|
dirstate_corpus.py | 535 B |
r44288:ba84a1ae4ae5 |
|
|
fm1readmarkers.cc | 1.4 KiB |
r44311:8766728dbce6 |
|
|
fm1readmarkers_corpus.py | 2.0 KiB |
r43346:2372284d9457 |
|
|
fncache.cc | 1.8 KiB |
r44311:8766728dbce6 |
|
|
fuzzutil.h | 1002 B |
r44013:6f5c352f41b6 |
|
|
jsonescapeu8fast.cc | 1.4 KiB |
r44311:8766728dbce6 |
|
|
manifest.cc | 1.8 KiB |
r44311:8766728dbce6 |
|
|
manifest_corpus.py | 1.3 KiB |
r43346:2372284d9457 |
|
|
mpatch.cc | 3.0 KiB |
r44255:7857bd9bb2b0 |
|
|
mpatch_corpus.py | 22.9 KiB |
r44308:229215fc1c1c |
|
|
pyutil.cc | 1.7 KiB |
r44311:8766728dbce6 |
|
|
pyutil.h | 228 B |
r44311:8766728dbce6 |
|
|
revlog.cc | 1.6 KiB |
r44311:8766728dbce6 |
|
|
revlog_corpus.py | 852 B |
r44288:ba84a1ae4ae5 |
|
|
standalone_fuzz_target_runner.cc | 1.5 KiB |
r44253:01ec70a80a7b |
|
|
xdiff.cc | 1.4 KiB |
r44255:7857bd9bb2b0 |
|
How to add fuzzers (partially cribbed from oss-fuzz[0]):
- git clone https://github.com/google/oss-fuzz
- cd oss-fuzz
- python infra/helper.py build_image mercurial
- docker run --cap-add=SYS_PTRACE -it -v $HG_REPO_PATH:/hg-new
- gcr.io/oss-fuzz/mercurial bash
- cd /src
- rm -r mercurial
- ln -s /hg-new mercurial
- cd mercurial
- compile
- ls $OUT
Step 9 is literally running the command "compile", which is part of the docker container. Once you have that working, you can build the fuzzers like this (in the oss-fuzz repo):
python infra/helper.py build_fuzzers --sanitizer address mercurial $HG_REPO_PATH
(you can also say "memory", "undefined" or "coverage" for sanitizer). Then run the built fuzzers like this:
python infra/helper.py run_fuzzer mercurial -- $FUZZER
0: https://github.com/google/oss-fuzz/blob/master/docs/new_project_guide.md