Skip to content

Add fuzzing by way of ClusterFuzzLite #232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 23, 2023

Conversation

DavidKorczynski
Copy link
Contributor

@DavidKorczynski DavidKorczynski commented Dec 23, 2023

This adds fuzzing by way of ClusterFuzzLite, which is a GitHub action that will perform a short amount of fuzzing for new PRs. The goal is to use fuzzing to catch bugs that may be introduced by new PRs.

I added a fuzzer that targets toml::parse and currently set the timeout of CFLite to 240 seconds. CFLite will flag if the fuzzer finds any issues in the code introduced by a PR.

To reproduce this set up the way ClusterFuzzLite does it (by way of OSS-Fuzz) you can do:

git clone https://github.com/google/oss-fuzz
git clone https://github.com/DavidKorczynski/toml11
cd toml11
git checkout clusterfuzzlite

# Build the fuzzers in .clusterfuzzlite
python3 ../oss-fuzz/infra/helper.py build_fuzzers --external $PWD

# Run the fuzzer for 10 seconds
python3 ../oss-fuzz/infra/helper.py run_fuzzer --external $PWD parse_fuzzer -- -max_total_time=10

Signed-off-by: David Korczynski <david@adalogics.com>
@ToruNiina
Copy link
Owner

Linux + clang fails because of this maybe. Ignore the results of linux+clang cases.

actions/runner-images#8659

I will write a patch to workaround this later.

Signed-off-by: David Korczynski <david@adalogics.com>
@ToruNiina ToruNiina merged commit 510419f into ToruNiina:master Dec 23, 2023
@ToruNiina
Copy link
Owner

It looks okay except the case I already mentioned. Merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants