This functionality is provided by libFuzzer, which is available on most platforms. However, libFuzzer is also missing on some platforms. E.g. https://github.com/google/sanitizers/issues/1165
Thus, it could make sense to implement this in our code to be able to execute the existing fuzz inputs.
The basic idea is to check if a folder was passed into main
(https://github.com/bitcoin/bitcoin/blob/63314b8211d795b2bf0814e244d801e74f50b152/src/test/fuzz/fuzz.cpp#L75) and then iterate over the files and pass them into test_one_input
.
Useful skills:
- C++17 std::filesystem
- https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md
Want to work on this issue?
For guidance on contributing, please read CONTRIBUTING.md before opening your pull request.