Skip to content

Conversation

@alaviss
Copy link
Collaborator

@alaviss alaviss commented Dec 17, 2024

Add a new fuzz target to the repository. This target can be built using clang + libFuzzer by running:

make -C src/fuzz

# Alternatively, to use AFL++
CC=afl-clang-fast make -C src/fuzz

The target can be run locally with

./src/fuzz/zforth_fuzzer # -help=1 for possible flags

# To use with AFL++
afl-fuzz -i forth -o <output directory> -- ./src/fuzz/zforth_fuzzer

There is a dictionary used to improve fuzz coverage in src/fuzz/zforth_fuzzer.dict that I made with words from the primitive set, please take a look to make sure that it's correct. You can find some samples dictionaries here.

I also found some weird infinite loops that might have to do with how I'm using zForth (you can look at the failing CI to see a test case), so some review for that would be appreciated.

Added with this is a continuous fuzzing job using ClusterFuzzLite. This is the smaller version of Google's OSS-Fuzz project.

Right now there are three jobs being run:

  • Daily fuzzing: A daily 1hr fuzzing job
  • PR fuzzing: Fuzz all PRs for 5 mins
  • Weekly coverage and corpus cleaning job

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.

1 participant