diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2020-06-12 04:27:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-11 18:27:01 -0700 |
commit | 26e8d7c7728096edf55a1fb6d0ecbc4b2dae6afa (patch) | |
tree | 279780c0879c7c81e43106975c1086449a0ba55b /docs/getting-started | |
parent | 13c2289d14f7736e93b5b79c8b30b4a9bd5c87c6 (diff) | |
download | oss-fuzz-26e8d7c7728096edf55a1fb6d0ecbc4b2dae6afa.tar.gz |
[CIFuzz] Add support for different sanitizers (#3969)
* Revert "Revert "[CIFuzz] Add support for different sanitizers (#3516)""
This reverts commit c580d0d626247017dede2847869e1eb8a3705ee1.
* cifuzz: pass "sanitizer" to the "run fuzzer" step
It's a follow-up to https://github.com/google/oss-fuzz/pull/3516 that
should fix https://github.com/google/oss-fuzz/issues/3727.
* [cifuzz] drop a $
That's another follow-up to #3516 that should help to pass sanitizer correctly.
Otherwise, it always falls back to address with:
2020-06-11 21:10:14,852 - root - INFO - $address is not a project sanitizer, defaulting to address.
Diffstat (limited to 'docs/getting-started')
-rw-r--r-- | docs/getting-started/continuous_integration.md | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/docs/getting-started/continuous_integration.md b/docs/getting-started/continuous_integration.md index cc461a5b4..d536ea9be 100644 --- a/docs/getting-started/continuous_integration.md +++ b/docs/getting-started/continuous_integration.md @@ -82,6 +82,7 @@ jobs: ### Optional configuration +#### Configurable Variables `fuzz-time`: Determines how long CIFuzz spends fuzzing your project in seconds. The default is 600 seconds. The GitHub Actions max run time is 21600 seconds (6 hours). @@ -94,6 +95,67 @@ make sure to set the dry-run parameters in both the `Build Fuzzers` and `Run Fuz limit for broken fuzz targets than OSS-Fuzz's check_build. Most users should not set this. +#### Adding Other Sanitizers +CIFuzz supports address, memory and undefined sanitizers. Address is the default +sanitizer and will be used for every job in which a sanitizer is not specified. +To add another sanitizer to your workflow copy the `Fuzzing` job and rename it +to the sanitizer you want to fuzz with. Then add the sanitizer variable to both +the `Build Fuzzers` step and the `Run Fuzzers` step. The choices are `'address'`, +`'memory'`, and `'undefined'`. Once this additional job is configured the CIFuzz +workflow will run all of the jobs corresponding to each sanitizer simultaneously. +It is important to note that the `Build Fuzzers` and the `Run Fuzzers` sanitizer +field needs to be the same. See the following main.yml file for an example. + +```yaml +name: CIFuzz +on: [pull_request] +jobs: + AddressFuzzing: + runs-on: ubuntu-latest + steps: + - name: Build Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master + with: + oss-fuzz-project-name: 'example' + dry-run: false + # sanitizer: address + - name: Run Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master + with: + oss-fuzz-project-name: 'example' + fuzz-seconds: 600 + dry-run: false + # sanitizer: address + - name: Upload Crash + uses: actions/upload-artifact@v1 + if: failure() + with: + name: Address-Artifacts + path: ./out/artifacts + UndefinedFuzzing: + runs-on: ubuntu-latest + steps: + - name: Build Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master + with: + oss-fuzz-project-name: 'example' + dry-run: false + sanitizer: 'undefined' + - name: Run Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master + with: + oss-fuzz-project-name: 'example' + fuzz-seconds: 600 + dry-run: false + sanitizer: 'undefined' + - name: Upload Crash + uses: actions/upload-artifact@v1 + if: failure() + with: + name: Undefined-Artifacts + path: ./out/artifacts +``` + ## Understanding results The results of CIFuzz can be found in two different places. |