Skip to content
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

Add fuzzing by way of ClusterFuzzLite #33

Merged
merged 1 commit into from
Dec 26, 2023

Conversation

DavidKorczynski
Copy link
Contributor

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 json::parse and currently set the timeout of CFLite to 120 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/meojson
cd meojson
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

@MistEO
Copy link
Owner

MistEO commented Dec 24, 2023

Thanks for your contribution!

and you found a crash issue, we will merge it with this PR after fixing it.

@MistEO
Copy link
Owner

MistEO commented Dec 24, 2023

@dantmnf https://github.com/MistEO/meojson/blob/master/include/json.hpp#L2302 这里跳出后没做检查崩了!

@MistEO MistEO changed the base branch from master to dev December 26, 2023 02:57
@MistEO MistEO merged commit 3088b35 into MistEO:dev Dec 26, 2023
3 checks passed
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.

3 participants