-
Notifications
You must be signed in to change notification settings - Fork 591
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
fuzz: Adds fuzz test #386
fuzz: Adds fuzz test #386
Conversation
Is this generating random input to the options parser and then checking that it doesn't segfault? Would you also use fuzzing to somehow check that a range of input is processed correctly (like integers being parsed correctly) or is it more often just to check that the program doesn't crash on weird input? Can you integrate this with the CMake build as well? |
Yeah, that's pretty much it, although there are some heuristics to guide the process. For example, if a random input achieves good code coverage, instead of trying again with new random data, it'll randomly mutate the original data. There is also the option to combine it with various sanitizers. If you aren't familiar with sanitizers you can think of these as runtime "bug detectors". Here's a non-exhaustive list of sanitizers that are supported;
Yeah sure, I rarely use Cmake so that might take me a bit to work out what I need to do :) |
RE:
This is very much supported. Though the reason I didn't include it in this fuzzing harness is that most of that seems to happen using the |
b4f2f6a
to
2b9dc41
Compare
2b9dc41
to
d6bf1d5
Compare
Some notes for recent changes:
Sorry for the CI spam :) |
As requested I also added the Cmake support |
This looks good, thanks. |
Adds a fuzz test harness. I run the fuzzer for about 12hrs on 8 cores and didn't find any bugs, which is quite impressive :) So you've done well with your library. I thought I'd open a pull request with the hopes that the fuzzer can be integrated into the CI.
This change is