diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2017-05-22 17:41:21 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2017-05-22 17:41:21 +0200 |
| commit | b4fade26b674c3f50b2b219cda67448dad1a5885 (patch) | |
| tree | 6b121062147c6559c125e192c67e848127cd92e3 /test/fuzzers | |
| parent | 4e3bd5235009fbcfe5762ba14c0c5c363f29c908 (diff) | |
| download | PROJ-b4fade26b674c3f50b2b219cda67448dad1a5885.tar.gz PROJ-b4fade26b674c3f50b2b219cda67448dad1a5885.zip | |
Add test/fuzzers/README.txt
Diffstat (limited to 'test/fuzzers')
| -rw-r--r-- | test/fuzzers/README.TXT | 37 | ||||
| -rw-r--r-- | test/fuzzers/standard_fuzzer.cpp | 2 |
2 files changed, 38 insertions, 1 deletions
diff --git a/test/fuzzers/README.TXT b/test/fuzzers/README.TXT new file mode 100644 index 00000000..9cd6f0ad --- /dev/null +++ b/test/fuzzers/README.TXT @@ -0,0 +1,37 @@ +This directory contain fuzzer main funtions and scripts for the +Google OSS Fuzz project: https://github.com/google/oss-fuzz/ + +The main build scripts are in: +https://github.com/google/oss-fuzz/tree/master/projects/proj4 +and call scripts in this directory. + +The list of issues is in: +https://bugs.chromium.org/p/oss-fuzz/issues/list?q=proj4 + +- Build standard_fuzzer in a standalone mode: + + $ g++ -g -std=c++11 standard_fuzzer.cpp -o standard_fuzzer -DSTANDALONE ../../src/.libs/libproj.a -lpthread + + Run it: + $ ./standard_fuzzer {file_generated_by_oss_fuzz} + +- Run locally OSS Fuzz: + $ git clone https://github.com/google/oss-fuzz.git + $ cd oss-fuzz + $ export PROJECT_NAME=proj4 + $ python infra/helper.py build_image $PROJECT_NAME + + Build fuzzers with the address sanitizer (could use undefined, etc...) + $ python infra/helper.py build_fuzzers --sanitizer address $PROJECT_NAME + + Test a particular fuzzer (replace standard_fuzzer by other fuzzers) + $ python infra/helper.py run_fuzzer $PROJECT_NAME standard_fuzzer + + +How to deal with issues reported in https://bugs.chromium.org/p/oss-fuzz/issues/list?q=proj4 ? + + 1. Leave a comment in (chromium database) bug entry to indicate that you work on it + 2. Work + 3. Commit a bug fix with log including "Credit to OSS-Fuzz" and a link to the bugs.chromium.org ticket + 4. Add in the bugs.chromium.org ticket a link to the github changeset implementing the fix. + 5. Check chromium closed the bug (after one or two days typically) diff --git a/test/fuzzers/standard_fuzzer.cpp b/test/fuzzers/standard_fuzzer.cpp index 470d1b1a..de2e2aa8 100644 --- a/test/fuzzers/standard_fuzzer.cpp +++ b/test/fuzzers/standard_fuzzer.cpp @@ -37,7 +37,7 @@ #include "proj_api.h" /* Standalone build: -g++ -g -std=c++11 standard_fuzzer.cpp -o standard_fuzzer -DSTANDALONE ../src/.libs/libproj.a -lpthread +g++ -g -std=c++11 standard_fuzzer.cpp -o standard_fuzzer -DSTANDALONE ../../src/.libs/libproj.a -lpthread */ extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv); |
